Skip to content

Add base images from the catalog (admin).

POST
/v1/images/base-images/actions/add
Code sample: Shell / cURL
curl --request POST \
--url https://stratum.example.com/v1/images/base-images/actions/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "names": [ "ubuntu-26-04-cloud", "debian-13-genericcloud" ], "storageClass": "example" }'

Records a global image import for each named entry that is not already registered or importing, and answers every named entry with its standing afterwards (202). The import is the URL import of POST /v1/images: the lifecycle worker downloads the pinned build, checks its size and sha256 before anything is written, and imports it into the default storage class (or storageClass). An entry that failed before is replaced: its image is deleted and a new import recorded. An entry whose name another image holds is left alone and answered nameTaken.

A download the network does not deliver (no route, no answer within 15 s, no data for 60 s, an HTTP error) fails the image in seconds with stateReason Not downloaded: <reason>..

An unknown or repeated name refuses the whole request (400).

Media typeapplication/json
object
names
required

Catalog entry names to add. Each at most once.

Array<string>
>= 1 items

Example

[
"ubuntu-26-04-cloud",
"debian-13-genericcloud"
]
storageClass

Storage class to import into. Default is the default class.

string

Each named entry’s standing after the request.

Media typeapplication/json
object
items
required
Array<object>

One entry of the base-image catalog: a cloud image pinned to a dated upstream build by URL, size and sha256, and where it stands on this install.

object
name
required

The image name an added entry is registered under.

string
displayName
required
string
osDistribution
required
string
osVersion
required
string
version
required

The pinned upstream build.

string
format
required
string
Allowed values: qcow2 raw
architecture
required
string
Allowed values: amd64
sizeBytes
required

Size of the download, checked before the import.

integer format: int64
sha256
required

SHA-256 of the download, checked before the import.

string
sourceUrl
required

Where the control plane downloads the image from.

string format: uri
status
required

Where the entry stands on this install:

  • available: nothing is registered for it; it can be added.
  • importing: its image is being downloaded or imported.
  • registered: an image of the pinned build is registered (matched by sha256, whatever its name or source).
  • failed: its import failed (stateReason says why). Adding it again replaces the failed image.
  • nameTaken: another image holds the name. Delete or rename it to add the entry.
string
Allowed values: available importing registered failed nameTaken
imageId

The image the status is about. Absent when available.

string
imageState

That image’s state.

string
Allowed values: pending downloading importing creating active disabled deprecated deleting deleted error
stateReason

Why that image failed, for example Not downloaded: no internet access. when the control plane cannot reach the upstream server.

string

Example

{
"items": [
{
"name": "ubuntu-26-04-cloud",
"displayName": "Ubuntu 26.04 LTS",
"osDistribution": "ubuntu",
"osVersion": "26.04",
"version": "20260927",
"format": "qcow2",
"architecture": "amd64",
"status": "available",
"imageState": "pending"
}
]
}

Bad request.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}

Authenticated but not authorized.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}