better/compute
API

images

The images group is the catalog of OS images and ramdisks that deploys write to disk. An image is registered by its digest and source URL, never uploaded, and a signature from a signer on the tenant's or the platform's allowlist marks it verified. Unsigned images stay private to their tenant; only verified images can be made public. See [Profiles and images](/docs/guides/bare-metal/profiles-and-images).

The images group is the catalog of OS images and ramdisks that deploys write to disk. An image is registered by its digest and source URL, never uploaded, and a signature from a signer on the tenant's or the platform's allowlist marks it verified. Unsigned images stay private to their tenant; only verified images can be made public. See Profiles and images.

All 4 methods are served by this release.

MethodKindAuthorizationPhaseStatus
registermutationcompute:images:publish @ compute-tenant or compute:images:publish @ compute-fleetv0.2registered
getreadcompute:images:read @ compute-imagev0.2registered
listreadcompute:images:read @ compute-tenant + itemsv0.2registered
promotemutationcompute:images:publish @ compute-imagev0.2registered

register

POST /api/compute/images/register

Records an image by ref (name@version), format, digest and https:// or oci:// source in the tenant's catalog; with a valid signature it is marked verified.

  • Decided as compute:images:publish on the tenant.
  • signature and signerId go together. The signature must verify against that signer on the tenant's allowlist or the platform's, else INVALID_INPUT.
  • A ramdisk must be signed by a platform signer (INVALID_INPUT otherwise).
  • CONFLICT when the tenant already has that ref, so a repeated call does not create a second image.

The new image is private. Site agents whose pools pre-warm this ref (policy.prewarmImages) get their desired state refreshed.

  • Kind: mutation
  • Authorization: compute:images:publish @ compute-tenant or compute:images:publish @ compute-fleet
  • Module: provision
  • Phase: v0.2 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
refstringyes1-200 characters
kindone of os, ramdiskdefault "os"
formatone of raw, qcow2, isoyes
compressionone of none, zstd, gzipdefault "none"
sha256stringyes1-64 characters; matches ^[0-9A-Fa-f]{64}$
sizeBytesintegerat least 0
sourcestringyes1-2048 characters
signaturestring1-1024 characters
signerIdstring1-128 characters

get

POST /api/compute/images/get

Returns one image the tenant owns, or a public one, by its img_ id.

NOT_FOUND when the image does not exist, is deleted, or belongs to another tenant and is not public.

  • Kind: read
  • Authorization: compute:images:read @ compute-image
  • Module: provision
  • Phase: v0.2 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
imageIdstringyesat most 56 characters; matches ^img_[0-9a-hjkmnp-tv-z]{26,52}$

list

POST /api/compute/images/list

Returns a page of the tenant's own images and public ones, ordered by ref, optionally filtered by kind (os or ramdisk).

limit defaults to 50 and is at most 200; pass the returned cursor to read the next page.

  • Kind: read
  • Authorization: compute:images:read @ compute-tenant + items
  • Module: provision
  • Phase: v0.2 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
kindone of os, ramdisk
limitinteger1-200; default 50
cursorstringat most 256 characters

promote

POST /api/compute/images/promote

Makes a verified image the tenant owns public, so every tenant can read and deploy it.

Decided as compute:images:publish on the image. An unsigned image is INVALID_STATE; an image the tenant does not own is NOT_FOUND. Promoting an image that is already public returns it unchanged. Site agents whose pools pre-warm this ref get their desired state refreshed.

  • Kind: mutation
  • Authorization: compute:images:publish @ compute-image
  • Module: provision
  • Phase: v0.2 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesat most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$
imageIdstringyesat most 56 characters; matches ^img_[0-9a-hjkmnp-tv-z]{26,52}$

Was this page helpful?

Better Compute is created by Sean Filimon

Last updated

On this page