Skip to content

Disks

A disk is a block volume. Every instance has at least one boot disk, and you can create additional standalone disks to attach later. Disk responses include a live envelope with real-time usage_pct when the data is available. Creating, attaching, detaching, resizing, and deleting a disk are all asynchronous.

Search workspace disks

GET/v1/workspaces/{wid}/disksSearch workspace disks

Lists disks belonging to a workspace, with pagination.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Query parameters

NameTypeDescription
qstringQuick search by name or ID
idinteger[]Filter to specific disk IDs
instanceinteger[]Filter by attached instance ID
ownerinteger[]Filter by workspace ID
namestringFilter by name
bootbooleanFilter to boot disks only, or non-boot disks only
statestring[]Filter by resource state (AVAILABLE, PENDING, ...)
backendstring[]Filter by storage backend (LOCAL, CEPH)

Plus the shared pagination parameters. Returns a paged list of disks.

bash
curl https://api.galaxygate.net/v1/workspaces/42/disks \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -A 'curl/8.5'

Search all disks

GET/v1/disksSearch all disks

Administrator-only catalog view. Accepts the same query parameters as the workspace-scoped endpoint above and returns disks across all workspaces. Returns a paged list of disks.

Create a disk

POST/v1/workspaces/{wid}/disksCreate a disk

Creates a new standalone disk in a workspace. The disk is unattached until you call attach.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Request body

FieldTypeRequiredDescription
namestringyesDisk name
sizeintegeryesDisk size in bytes
backendstringyesStorage backend: LOCAL or CEPH
regionstringyesRegion to place the disk in, for example NA_01
bash
curl -X POST https://api.galaxygate.net/v1/workspaces/42/disks \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -H "Content-Type: application/json" \
  -A 'curl/8.5' \
  -d '{
    "name": "data-vol-01",
    "size": 107374182400,
    "backend": "LOCAL",
    "region": "NA_01"
  }'

Returns a WorkflowWithResource containing a workflow and the new disk resource. Poll GET /v1/disks/{did} until state is AVAILABLE.

Fetch a disk

GET/v1/disks/{did}Fetch disk by ID

Path parameters

NameTypeDescription
didintegerDisk ID

Returns the disk detail, including backend, boot, size, attached instance, state, region, and a live object with usage_pct when available.

Update a disk

PATCH/v1/disks/{did}Update disk settings

Updates disk settings. Send only the fields you want to change.

Path parameters

NameTypeDescription
didintegerDisk ID

Request body

FieldTypeDescription
namestringRename the disk

Returns the updated disk detail.

Attach a disk

POST/v1/disks/{did}/attachAttach a disk to an instance

Attaches the disk to an instance. The disk must be detached and AVAILABLE.

Path parameters

NameTypeDescription
didintegerDisk ID

Request body

FieldTypeRequiredDescription
instance_idintegeryesInstance to attach the disk to

Returns a workflow (202 Accepted).

Detach a disk

POST/v1/disks/{did}/detachDetach a disk from its instance

Detaches the disk from its current instance. The disk must be attached.

Path parameters

NameTypeDescription
didintegerDisk ID

No request body. Returns a workflow (202 Accepted).

Resize a disk

POST/v1/disks/{did}/resizeGrow a disk

Grows the disk to a larger size. Shrinking is not supported.

Path parameters

NameTypeDescription
didintegerDisk ID

Request body

FieldTypeRequiredDescription
sizeintegeryesNew disk size in bytes; must be larger than the current size

Returns a workflow (202 Accepted).

Delete a disk

DELETE/v1/disks/{did}Delete a disk

Permanently deletes a detached disk and frees its storage. The disk must be detached before deletion.

Path parameters

NameTypeDescription
didintegerDisk ID

Returns a workflow (202 Accepted).