Sign Up

Volumes

List all volumes

GET
/volumes

Authorization

headerAuthorizationBearer <token>

API Key access

Query Parameters

includeDeleted?boolean

Include deleted volumes in the response

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

List of all volumes

application/json
  1. response
[index: integer]?
curl -X GET 'http://localhost:3000/volumes'
[  {    "organizationId": "123e4567-e89b-12d3-a456-426614174000",    "createdAt": "2023-01-01T00:00:00.000Z",    "lastUsedAt": "2023-01-01T00:00:00.000Z",    "errorReason": "Error processing volume",    "name": "my-volume",    "id": "vol-12345678",    "state": "ready",    "updatedAt": "2023-01-01T00:00:00.000Z"  }]

Create a new volume

POST
/volumes

Authorization

headerAuthorizationBearer <token>

API Key access

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Request Body

application/json
  1. body
name*string

Response Body

The volume has been successfully created.

application/json
  1. response
id*string

Volume ID

name*string

Volume name

organizationId*string

Organization ID

state*string

Volume state

Value in"creating""ready""pending_create""pending_delete""deleting""deleted""error"
createdAt*string

Creation timestamp

updatedAt*string

Last update timestamp

lastUsedAt?|

Last used timestamp

errorReason*|

The error reason of the volume

curl -X POST 'http://localhost:3000/volumes' \  -H 'Content-Type: application/json' \  -d '{  "name": "name"}'
{  "organizationId": "123e4567-e89b-12d3-a456-426614174000",  "createdAt": "2023-01-01T00:00:00.000Z",  "lastUsedAt": "2023-01-01T00:00:00.000Z",  "errorReason": "Error processing volume",  "name": "my-volume",  "id": "vol-12345678",  "state": "ready",  "updatedAt": "2023-01-01T00:00:00.000Z"}

Get volume details

GET
/volumes/{volumeId}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

volumeId*string

ID of the volume

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

Volume details

application/json
  1. response
id*string

Volume ID

name*string

Volume name

organizationId*string

Organization ID

state*string

Volume state

Value in"creating""ready""pending_create""pending_delete""deleting""deleted""error"
createdAt*string

Creation timestamp

updatedAt*string

Last update timestamp

lastUsedAt?|

Last used timestamp

errorReason*|

The error reason of the volume

curl -X GET 'http://localhost:3000/volumes/string'
{  "organizationId": "123e4567-e89b-12d3-a456-426614174000",  "createdAt": "2023-01-01T00:00:00.000Z",  "lastUsedAt": "2023-01-01T00:00:00.000Z",  "errorReason": "Error processing volume",  "name": "my-volume",  "id": "vol-12345678",  "state": "ready",  "updatedAt": "2023-01-01T00:00:00.000Z"}

Delete volume

DELETE
/volumes/{volumeId}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

volumeId*string

ID of the volume

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

Volume has been marked for deletion

curl -X DELETE 'http://localhost:3000/volumes/string'
Empty
GET
/volumes/by-name/{name}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

name*string

Name of the volume

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

Volume details

application/json
  1. response
id*string

Volume ID

name*string

Volume name

organizationId*string

Organization ID

state*string

Volume state

Value in"creating""ready""pending_create""pending_delete""deleting""deleted""error"
createdAt*string

Creation timestamp

updatedAt*string

Last update timestamp

lastUsedAt?|

Last used timestamp

errorReason*|

The error reason of the volume

curl -X GET 'http://localhost:3000/volumes/by-name/string'
{  "organizationId": "123e4567-e89b-12d3-a456-426614174000",  "createdAt": "2023-01-01T00:00:00.000Z",  "lastUsedAt": "2023-01-01T00:00:00.000Z",  "errorReason": "Error processing volume",  "name": "my-volume",  "id": "vol-12345678",  "state": "ready",  "updatedAt": "2023-01-01T00:00:00.000Z"}