Skip to content

List cloud-assets

GET
/cloud-assets

Discovered/imported cloud resource (read-side inventory). Each record is a provider-native resource found by a read-only scan of a customer’s cloud account (BYOC). Separate from cloud-resource (Sencai-provisioned, write-side): different lifecycle and owner. An adopted asset may later reference a cloud-resource/cloud-instance via managed_as. Unique invariant: (credential, external_id) — enforced in service upsertAsset() + a DB unique index (W3-01).

pagination[page]
integer
pagination[pageSize]
integer
filters

Strapi REST filter syntax

object
sort
string
populate
string

OK

object
data
Array
object
external_id
required

Provider-native resource identifier (e.g. i-abc123, /subscriptions/…/resourceGroups/…, projects/…/instances/…). Unique together with credential.

string
credential_external_id_key

Denormalizovaný unique guard ‘<credentialId|null>:<external_id>’ pro DB-level vynucení invariantu (credential, external_id). Strapi v5 ukládá relace v link tabulkách, takže composite unique přes (credential, external_id) nelze vyjádřit jediným indexem; tento skalární sloupec ano. Udržuje ho service upsertAsset(); UNIQUE index nasazuje bootstrap ensureCloudAssetUniqueIndex(). NIKDY se nevrací v API (private).

string
resource_type
required

Provider resource type as a FREE STRING (ec2 | rds | s3 | lambda | vpc | iam-user | sg | azure-vm | storage-account | gce | gcs | …). Intentionally not an enum — too many provider-specific types to maintain.

string
provider
required
string
Allowed values: aws azure gcp hetzner ovhcloud scaleway upcloud digitalocean
credential
One of:

DocumentId reference to api::cloud-credential.cloud-credential

string
organisation
One of:

DocumentId reference to api::organisation.organisation

string
region

Provider region/location where the asset lives.

string
name

Human-readable name/label of the resource (provider Name tag, display name, …).

string
tags

Provider tags as a {k:v} map.

metadata

Raw resource descriptor (instance type, IPs, SG ids, …). LONGTEXT — do not store binary blobs.

ownership

Adoption state of the asset relative to Sencai management.

string
Allowed values: unmanaged read-only managed ignored
is_managed_by_sencai

True once Sencai actively manages this asset (adopted-for-management).

boolean
managed_as

DocumentId of the cloud-resource/cloud-instance this asset is adopted as, if Sencai actively manages it (nullable).

string
discovered_at

Timestamp when this asset was first discovered by a scan.

string format: date-time
last_seen_at

Timestamp of the most recent scan that observed this asset (refreshed on every upsert).

string format: date-time
stale

True když asset nebyl viděn posledním dokončeným scanem (last_seen_at < scan_started). Soft-flag (W3-03 scan-callback) — adopted/managed assety se NIKDY nemažou, jen flagují stale; unmanaged taky jen flagujeme (záznam zůstává pro audit/historii). Stale se zruší (false) jakmile ho další scan zase uvidí.

boolean
first_adopted_at

Timestamp when the asset was first adopted for Sencai management (nullable).

string format: date-time
tag_status

Stav adopt tag-injection (W3-05). pending = tag job zařazen; tagged = Sencai adopt tagy zapsány do cloudu; noop = provider/typ tagging nepodporuje (DB-only adopce); failed = tagging API selhalo. Plní worker přes tag-callback. Nullable (zdroj nebyl nikdy adoptován pro management).

string
Allowed values: pending tagged noop failed
home_region

Logical data-residency region of the tenant (CELL invariant, F2.CELL.01).

string
cell_id

Deployment cell within home_region for blast-radius isolation (CELL invariant, F2.CELL.01).

string
documentId
string
id
integer
createdAt
string format: date-time
updatedAt
string format: date-time
publishedAt
string format: date-time
nullable
meta
object
pagination
object
page
integer
pageSize
integer
pageCount
integer
total
integer

Missing or invalid authentication

Not authorized (tenant scope or capability)