Skip to content

Get a single cloud-asset by id

GET
/cloud-assets/{id}
id
required
string

DocumentId

OK

object
data
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

Missing or invalid authentication

Not authorized (tenant scope or capability)

Not found