Skip to content

Images ​

An image is a stored disk artifact you can provision from or restore onto an instance. Images are unified under a single resource with a kind field that distinguishes their role: TEMPLATE for distribution images and custom golden images, BACKUP for point-in-time copies of an instance disk, and ISO for bootable optical-disc images. Platform-provided images (those with no owner) are visible to every workspace. Creating, restoring, and deleting images are asynchronous.

List images visible to a workspace ​

GET/v1/workspaces/{wid}/imagesList images visible to a workspace

Returns images owned by the workspace plus all platform-provided images (where owner is null), merged and filtered by the search parameters.

Path parameters

NameTypeDescription
widstringWorkspace ID

Query parameters

NameTypeDescription
qstringQuick search by name or ID
idstring[]Filter to specific image IDs
namestringFilter by name
groupstringFilter by catalog group
descriptionstringFilter by description
osstringFilter by OS family (LINUX, WINDOWS, BSD)
kindstring[]Filter by kind (TEMPLATE, BACKUP, ISO)
source_instancestring[]Filter by source instance ID
source_diskstring[]Filter by source disk ID
officialbooleantrue to return only platform-provided images. false for workspace-owned only
deprecatedbooleanFilter by deprecated status
ownerstring[]Filter by owning workspace ID
statestring[]Filter by resource state (PENDING, AVAILABLE, FAILED, SUSPENDED, DELETING, UNPLACED)

All filters are optional. Plus the shared pagination parameters. Returns 200 OK with a KeysetResultImageListView containing image list items and pagination fields: limit, page, total, has_next, has_previous, after, and before.

bash
curl https://api.galaxygate.net/v1/workspaces/42/images?kind=TEMPLATE \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -A 'curl/8.5'

Create an image ​

POST/v1/workspaces/{wid}/imagesCreate an image

Creates a new image in a workspace. The source object controls where the bytes come from. We accept these combinations:

kindAllowed source.typeRequirements
TEMPLATEBACKUP, URLURL requires a staff session, os.family, and uefi. BACKUP inherits OS metadata and boot mode from the backup.
BACKUPINSTANCESupply instance_id, disk_id, or both. The instance must belong to the target workspace, be available and unlocked, and have a backup plan. Its disk must be available.
ISOUPLOAD, URLURL requires a staff session. UPLOAD is subject to workspace ISO count and storage quotas.

Path parameters

NameTypeDescription
widstringWorkspace ID

Request body

FieldTypeRequiredDescription
kindstringyesTEMPLATE, BACKUP, or ISO
namestringfor TEMPLATE and ISOImage name (4-64 characters). Generated for BACKUP when omitted.
sourceobjectyesWhere the bytes come from. See source fields below
descriptionstringImage description (4-1000 characters)
groupstringCatalog group, for example linux or windows (4-32 characters)
osobjectOS metadata for TEMPLATE and ISO. Required for a template URL source. See OS fields below
uefibooleanTemplate boot mode. Required for a template URL source. Inherited for a backup source

source fields

FieldTypeRequiredDescription
typestringyesURL, BACKUP, INSTANCE, or UPLOAD
urlstringfor URLSource URL (for URL type)
backup_idstringfor BACKUPBackup image ID to promote (for BACKUP type)
instance_idstringunless disk_id is setSource instance ID for INSTANCE
disk_idstringunless instance_id is setSource disk ID for INSTANCE. Defaults to the instance's boot disk.
size_bytesstringfor UPLOADExact byte count to upload, from 1 to 10737418240

os fields

FieldTypeRequiredDescription
familystringyesLINUX, WINDOWS, or BSD
namestringOS display name, for example Ubuntu 24.04
bash
curl -X POST https://api.galaxygate.net/v1/workspaces/42/images \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -H "Content-Type: application/json" \
  -A 'curl/8.5' \
  -d '{
    "kind": "TEMPLATE",
    "name": "my-golden-image",
    "source": { "type": "BACKUP", "backup_id": "1471181001588760790" }
  }'

Returns 202 Accepted with an ImageCreateResponse. For all source types except UPLOAD, the response is a WorkflowWithResource containing a workflow and the new image resource. For ISO images created with source type UPLOAD, the response also includes an upload object:

FieldTypeDescription
urlstringAbsolute signed URL to PUT the file to
expires_atstringISO 8601 timestamp when the URL expires
max_size_bytesintegerExact byte count to upload

Poll GET /v1/images/{imid} until state is AVAILABLE.

Fetch an image ​

GET/v1/images/{imid}Fetch image by ID

Path parameters

NameTypeDescription
imidstringImage ID

Returns 200 OK with an ImageDetailView, including kind, source, os, size, uefi, official, deprecated, owner, server, and state.

Update an image ​

PATCH/v1/images/{imid}Update image settings

Updates image metadata. Send only the fields you want to change. Responds 204 No Content on success.

Path parameters

NameTypeDescription
imidstringImage ID

Request body

FieldTypeDescription
namestringRename the image (4-32 characters)
descriptionstringUpdate the description (4-1000 characters), or null to clear it
groupstringUpdate the catalog group (4-32 characters), or null to clear it
osobjectUpdate OS metadata. Optional family is LINUX, WINDOWS, or BSD. Optional name is a string, or null to clear it

Returns 204 No Content.

Restore an image onto an instance disk ​

POST/v1/images/{imid}/restoreRestore an image onto an instance disk

Overwrites an instance disk with a TEMPLATE or BACKUP image. ISO images cannot be restored. The image, instance, and disk must be available, and the image must fit the disk. The instance must be unlocked and already offline unless restart is true.

Path parameters

NameTypeDescription
imidstringImage ID

Request body

FieldTypeRequiredDescription
instance_idstringyesInstance to restore onto
disk_idstringDisk belonging to the instance. Defaults to its boot disk.
restartbooleanWhether to restart the instance after restore (default false)

Returns 202 Accepted with a WorkflowData object.

Delete an image ​

DELETE/v1/images/{imid}Delete an image

Permanently deletes the image and frees its storage.

Path parameters

NameTypeDescription
imidstringImage ID

Returns 202 Accepted with a WorkflowData object.