Sign Up

Snapshots

GET/snapshots
AuthorizationBearer <token>

API Key access

In: header

Query Parameters

page?number

Page number of the results

Range1 <= value
Default1
limit?number

Number of results per page

Range1 <= value <= 200
Default100
name?string

Filter by partial name match

sourceSandboxId?string

Filter by the ID of the sandbox the snapshot was created from

sort?string

Field to sort by

Default"lastUsedAt"

Value in

  • "name"
  • "state"
  • "lastUsedAt"
  • "createdAt"
order?string

Direction to sort by

Default"desc"

Value in

  • "asc"
  • "desc"

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X GET "https://example.com/snapshots"
{  "items": [    {      "id": "string",      "organizationId": "string",      "general": true,      "name": "string",      "imageName": "string",      "state": "building",      "size": 0,      "entrypoint": [        "string"      ],      "cpu": 0,      "gpu": 0,      "gpuType": "H100",      "mem": 0,      "disk": 0,      "errorReason": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "lastUsedAt": "2019-08-24T14:15:22Z",      "buildInfo": {        "dockerfileContent": "FROM node:14\nWORKDIR /app\nCOPY . .\nRUN npm install\nCMD [\"npm\", \"start\"]",        "contextHashes": [          "hash1",          "hash2"        ],        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "snapshotRef": "daytonaio/sandbox:latest"      },      "regionIds": [        "string"      ],      "initialRunnerId": "runner123",      "ref": "daytonaio/sandbox:latest",      "sourceSandboxId": "sandbox123",      "sandboxClass": "linux-vm"    }  ],  "total": 0,  "page": 0,  "totalPages": 0}
POST/snapshots
AuthorizationBearer <token>

API Key access

In: header

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/snapshots" \  -H "Content-Type: application/json" \  -d '{    "name": "ubuntu-4vcpu-8ram-100gb"  }'
{  "id": "string",  "organizationId": "string",  "general": true,  "name": "string",  "imageName": "string",  "state": "building",  "size": 0,  "entrypoint": [    "string"  ],  "cpu": 0,  "gpu": 0,  "gpuType": "H100",  "mem": 0,  "disk": 0,  "errorReason": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "buildInfo": {    "dockerfileContent": "FROM node:14\nWORKDIR /app\nCOPY . .\nRUN npm install\nCMD [\"npm\", \"start\"]",    "contextHashes": [      "hash1",      "hash2"    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "snapshotRef": "daytonaio/sandbox:latest"  },  "regionIds": [    "string"  ],  "initialRunnerId": "runner123",  "ref": "daytonaio/sandbox:latest",  "sourceSandboxId": "sandbox123",  "sandboxClass": "linux-vm"}
GET/snapshots/{id}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

id*string

Snapshot ID or name

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X GET "https://example.com/snapshots/string"
{  "id": "string",  "organizationId": "string",  "general": true,  "name": "string",  "imageName": "string",  "state": "building",  "size": 0,  "entrypoint": [    "string"  ],  "cpu": 0,  "gpu": 0,  "gpuType": "H100",  "mem": 0,  "disk": 0,  "errorReason": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "buildInfo": {    "dockerfileContent": "FROM node:14\nWORKDIR /app\nCOPY . .\nRUN npm install\nCMD [\"npm\", \"start\"]",    "contextHashes": [      "hash1",      "hash2"    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "snapshotRef": "daytonaio/sandbox:latest"  },  "regionIds": [    "string"  ],  "initialRunnerId": "runner123",  "ref": "daytonaio/sandbox:latest",  "sourceSandboxId": "sandbox123",  "sandboxClass": "linux-vm"}
DELETE/snapshots/{id}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

curl -X DELETE "https://example.com/snapshots/string"
Empty
GET/snapshots/{id}/build-logs

This endpoint is deprecated. Use getSnapshotBuildLogsUrl instead.

AuthorizationBearer <token>

API Key access

In: header

Path Parameters

id*string

Snapshot ID

Query Parameters

follow?boolean

Whether to follow the logs stream

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

curl -X GET "https://example.com/snapshots/string/build-logs"
Empty
GET/snapshots/{id}/build-logs-url
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X GET "https://example.com/snapshots/string/build-logs-url"
{  "url": "string"}
POST/snapshots/{id}/activate
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

application/json

curl -X POST "https://example.com/snapshots/string/activate"
{  "id": "string",  "organizationId": "string",  "general": true,  "name": "string",  "imageName": "string",  "state": "building",  "size": 0,  "entrypoint": [    "string"  ],  "cpu": 0,  "gpu": 0,  "gpuType": "H100",  "mem": 0,  "disk": 0,  "errorReason": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "buildInfo": {    "dockerfileContent": "FROM node:14\nWORKDIR /app\nCOPY . .\nRUN npm install\nCMD [\"npm\", \"start\"]",    "contextHashes": [      "hash1",      "hash2"    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "snapshotRef": "daytonaio/sandbox:latest"  },  "regionIds": [    "string"  ],  "initialRunnerId": "runner123",  "ref": "daytonaio/sandbox:latest",  "sourceSandboxId": "sandbox123",  "sandboxClass": "linux-vm"}
POST/snapshots/{id}/deactivate
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

curl -X POST "https://example.com/snapshots/string/deactivate"
Empty