Skip to main content

Volumes

Create, manage, and share persistent storage volumes. Volumes provide durable storage for workspaces and can be attached to multiple workspaces within a project.

All endpoints require authentication via X-API-Key header and the appropriate scope.


Volume Object

{
"id": "vol_def001",
"label": "Training Data",
"name": "training-data",
"description": "Dataset for ML model training",
"status": "bound",
"type": "data",
"volumeType": "persistent",
"sizeGb": 64,
"mountPath": "/data/training",
"organizationId": "org_xyz",
"owner": {
"id": "user_456",
"name": "Jane Smith",
"email": "jane@example.com"
},
"ownerId": "user_456",
"projectId": "proj_abc123",
"isShared": false,
"shared": false,
"sharedWith": [],
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}

GET /api/v1/volumes

List all volumes accessible to the authenticated user.

Scope: volumes:read

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by label, name, or description
typestringNoFilter by type: data, model, workspace, shared
projectIdstringNoFilter by project ID
limitintegerNoNumber of results to return (default: 20)
offsetintegerNoNumber of results to skip (default: 0)
sortstringNoSort field and direction, e.g. createdAt:desc

Response 200 OK

{
"count": 6,
"limit": 20,
"offset": 0,
"volumes": [
{
"id": "vol_def001",
"label": "Training Data",
"name": "training-data",
"description": "Dataset for ML model training",
"status": "bound",
"type": "data",
"volumeType": "persistent",
"sizeGb": 64,
"mountPath": "/data/training",
"organizationId": "org_xyz",
"ownerId": "user_456",
"projectId": "proj_abc123",
"isShared": false,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}
]
}

POST /api/v1/volumes

Create a new volume.

Scope: volumes:write

Request Body

{
"projectId": "proj_abc123",
"label": "Training Data",
"sizeGB": 64,
"description": "Dataset for ML model training",
"type": "data",
"mountPath": "/data/training"
}
FieldTypeRequiredDescription
projectIdstringYesProject to attach the volume to
labelstringYesHuman-readable label for the volume
sizeGBintegerYesVolume size in gigabytes
descriptionstringNoVolume description
typestringNoVolume type: data, model, workspace (default: data)
mountPathstringNoMount path inside workspaces (default: /data/<label-slug>)

Response 201 Created

{
"volumeId": "vol_def001"
}

GET /api/v1/volumes/:id

Get a single volume by ID.

Scope: volumes:read

Path Parameters

ParameterTypeRequiredDescription
idstringYesVolume ID

Response 200 OK

Returns the full Volume object.


PUT /api/v1/volumes/:id

Update an existing volume. Protected fields (_id, owner, createdAt, organizationId) cannot be overwritten.

Scope: volumes:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesVolume ID

Request Body

{
"label": "Updated Training Data",
"description": "Updated description",
"mountPath": "/data/updated-training"
}
FieldTypeRequiredDescription
labelstringNoHuman-readable label
descriptionstringNoVolume description
mountPathstringNoMount path inside workspaces

Response 200 OK

Returns the updated Volume object.


DELETE /api/v1/volumes/:id

Delete a volume. The volume must not be attached to any running workspace. This action is irreversible.

Scope: volumes:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesVolume ID

Response 204 No Content


POST /api/v1/volumes/:id/sync

Sync volume contents to S3. Creates a backup of the volume data in the organization's configured S3 bucket.

Scope: volumes:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesVolume ID

Response 200 OK

{
"message": "Volume sync to S3 initiated",
"volumeId": "vol_def001",
"syncJobId": "sync_abc001"
}

POST /api/v1/volumes/:id/make-shared

Make a volume shared across the organization. Once shared, the volume becomes read-accessible to all organization members.

Scope: volumes:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesVolume ID

Response 200 OK

{
"message": "Volume is now shared",
"volumeId": "vol_def001",
"isShared": true
}

GET /api/v1/volumes/shared

List all shared volumes available within the organization.

Scope: volumes:read

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by label, name, or description
limitintegerNoNumber of results to return (default: 20)
offsetintegerNoNumber of results to skip (default: 0)
sortstringNoSort field and direction, e.g. createdAt:desc

Response 200 OK

{
"count": 3,
"limit": 20,
"offset": 0,
"volumes": [
{
"id": "vol_shared001",
"label": "Common Datasets",
"name": "common-datasets",
"description": "Shared datasets for the organization",
"status": "bound",
"type": "data",
"sizeGb": 256,
"organizationId": "org_xyz",
"ownerId": "user_456",
"isShared": true,
"createdAt": "2025-01-10T08:00:00Z",
"updatedAt": "2025-01-28T16:30:00Z"
}
]
}