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
/v1/workspaces/{wid}/disksSearch workspace disksLists disks belonging to a workspace, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by name or ID |
id | integer[] | Filter to specific disk IDs |
instance | integer[] | Filter by attached instance ID |
owner | integer[] | Filter by workspace ID |
name | string | Filter by name |
boot | boolean | Filter to boot disks only, or non-boot disks only |
state | string[] | Filter by resource state (AVAILABLE, PENDING, ...) |
backend | string[] | Filter by storage backend (LOCAL, CEPH) |
Plus the shared pagination parameters. Returns a paged list of disks.
curl https://api.galaxygate.net/v1/workspaces/42/disks \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-A 'curl/8.5'Search all disks
/v1/disksSearch all disksAdministrator-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
/v1/workspaces/{wid}/disksCreate a diskCreates a new standalone disk in a workspace. The disk is unattached until you call attach.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Disk name |
size | integer | yes | Disk size in bytes |
backend | string | yes | Storage backend: LOCAL or CEPH |
region | string | yes | Region to place the disk in, for example NA_01 |
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
/v1/disks/{did}Fetch disk by IDPath parameters
| Name | Type | Description |
|---|---|---|
did | integer | Disk 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
/v1/disks/{did}Update disk settingsUpdates disk settings. Send only the fields you want to change.
Path parameters
| Name | Type | Description |
|---|---|---|
did | integer | Disk ID |
Request body
| Field | Type | Description |
|---|---|---|
name | string | Rename the disk |
Returns the updated disk detail.
Attach a disk
/v1/disks/{did}/attachAttach a disk to an instanceAttaches the disk to an instance. The disk must be detached and AVAILABLE.
Path parameters
| Name | Type | Description |
|---|---|---|
did | integer | Disk ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
instance_id | integer | yes | Instance to attach the disk to |
Returns a workflow (202 Accepted).
Detach a disk
/v1/disks/{did}/detachDetach a disk from its instanceDetaches the disk from its current instance. The disk must be attached.
Path parameters
| Name | Type | Description |
|---|---|---|
did | integer | Disk ID |
No request body. Returns a workflow (202 Accepted).
Resize a disk
/v1/disks/{did}/resizeGrow a diskGrows the disk to a larger size. Shrinking is not supported.
Path parameters
| Name | Type | Description |
|---|---|---|
did | integer | Disk ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
size | integer | yes | New disk size in bytes; must be larger than the current size |
Returns a workflow (202 Accepted).
Delete a disk
/v1/disks/{did}Delete a diskPermanently deletes a detached disk and frees its storage. The disk must be detached before deletion.
Path parameters
| Name | Type | Description |
|---|---|---|
did | integer | Disk ID |
Returns a workflow (202 Accepted).