Experimental
CreateSnapshot checkpoints a running sandbox; a stopped source is rejected.
/v1/sandboxes/{sandbox}/snapshots Connection and access
API connection and authentication guidance
https://connect.docker.com/sandboxes
—
The API base URL. Append the /v1 paths while preserving this URL's path prefix.
Use one of these alternatives. Requirements within an alternative apply together.
bearer
Parameters
sandbox
path
Required
Type:
string
All schema constraints and annotations
{
"type": "string"
}Idempotency-Key
header
Type:
string
All schema constraints and annotations
{
"description": "Idempotency key. A replay returns the first result; the same key with a different payload fails with FAILED_PRECONDITION; retained at least 24 hours.",
"title": "Idempotency-Key",
"type": "string"
}Request and responses
Request
application/json
Type:
object
captureMode
Schema:
CaptureMode
All schema constraints and annotations
{
"$ref": "#/components/schemas/CaptureMode",
"description": "capture_mode selects disk-only or memory plus disk capture. A value this\nenum does not define is rejected, never coerced to a capture."
}description
Type:
string
All schema constraints and annotations
{
"description": "description is caller-supplied text.",
"type": "string"
}displayName
· required
Type:
string
All schema constraints and annotations
{
"description": "display_name is a scoped label; the backend assigns the immutable resource ID.",
"minLength": 1,
"not": {
"enum": [
".",
".."
],
"type": "string"
},
"pattern": "^[^/]+$",
"type": "string"
}All schema constraints and annotations
{
"additionalProperties": false,
"description": "CreateSnapshotRequest captures one running sandbox.",
"properties": {
"captureMode": {
"$ref": "#/components/schemas/CaptureMode",
"description": "capture_mode selects disk-only or memory plus disk capture. A value this\nenum does not define is rejected, never coerced to a capture."
},
"description": {
"description": "description is caller-supplied text.",
"type": "string"
},
"displayName": {
"description": "display_name is a scoped label; the backend assigns the immutable resource ID.",
"minLength": 1,
"not": {
"enum": [
".",
".."
],
"type": "string"
},
"pattern": "^[^/]+$",
"type": "string"
}
},
"required": [
"displayName"
],
"title": "CreateSnapshotRequest",
"type": "object"
}Response
201
application/json
Headers
ETagThe etag of the resource this response carries, which the next mutation of it sends as If-Match.
{
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}All constraints apply
Schema:
Snapshot
All schema constraints and annotations
{
"not": {
"properties": {
"status": {
"enum": [
"creating"
]
}
},
"required": [
"status"
]
}
}All schema constraints and annotations
{
"allOf": [
{
"$ref": "#/components/schemas/Snapshot"
},
{
"not": {
"properties": {
"status": {
"enum": [
"creating"
]
}
},
"required": [
"status"
]
}
}
]
}Response
202
application/json
Headers
ETagThe etag of the resource this response carries, which the next mutation of it sends as If-Match.
{
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}All constraints apply
Schema:
Snapshot
status
· required
All schema constraints and annotations
{
"enum": [
"creating"
]
}All schema constraints and annotations
{
"properties": {
"status": {
"enum": [
"creating"
]
}
},
"required": [
"status"
]
}All schema constraints and annotations
{
"allOf": [
{
"$ref": "#/components/schemas/Snapshot"
},
{
"properties": {
"status": {
"enum": [
"creating"
]
}
},
"required": [
"status"
]
}
]
}Response
409
Creation conflicts with an existing resource (ALREADY_EXISTS).
The Idempotency-Key was already used with a different payload.
application/json
Schema:
Error
failedPrecondition
{
"code": "failedPrecondition",
"message": "The Idempotency-Key was already used with a different payload."
}Response
default
application/json
Schema:
Error
Schema example
{
"code": "notFound",
"details": [],
"message": "sandbox not found"
}Referenced schemas
#/components/schemas/CaptureMode
Complete operation contract
{
"description": "CreateSnapshot checkpoints a running sandbox; a stopped source is rejected.",
"operationId": "createSnapshot",
"parameters": [
{
"description": "The sandbox id.",
"in": "path",
"name": "sandbox",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Replay key. Reusing it with a different payload fails with failedPrecondition; accepted keys are retained for at least 24 hours.",
"in": "header",
"name": "Idempotency-Key",
"schema": {
"description": "Idempotency key. A replay returns the first result; the same key with a different payload fails with FAILED_PRECONDITION; retained at least 24 hours.",
"title": "Idempotency-Key",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"description": "CreateSnapshotRequest captures one running sandbox.",
"properties": {
"captureMode": {
"$ref": "#/components/schemas/CaptureMode",
"description": "capture_mode selects disk-only or memory plus disk capture. A value this\nenum does not define is rejected, never coerced to a capture."
},
"description": {
"description": "description is caller-supplied text.",
"type": "string"
},
"displayName": {
"description": "display_name is a scoped label; the backend assigns the immutable resource ID.",
"minLength": 1,
"not": {
"enum": [
".",
".."
],
"type": "string"
},
"pattern": "^[^/]+$",
"type": "string"
}
},
"required": [
"displayName"
],
"title": "CreateSnapshotRequest",
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Snapshot"
},
{
"not": {
"properties": {
"status": {
"enum": [
"creating"
]
}
},
"required": [
"status"
]
}
}
]
}
}
},
"description": "Success",
"headers": {
"ETag": {
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}
}
},
"202": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Snapshot"
},
{
"properties": {
"status": {
"enum": [
"creating"
]
}
},
"required": [
"status"
]
}
]
}
}
},
"description": "Accepted. The resource is still progressing; read it or follow its events until completion.",
"headers": {
"ETag": {
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}
}
},
"409": {
"content": {
"application/json": {
"examples": {
"failedPrecondition": {
"summary": "The Idempotency-Key was already used with a different payload.",
"value": {
"code": "failedPrecondition",
"message": "The Idempotency-Key was already used with a different payload."
}
}
},
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Creation conflicts with an existing resource (ALREADY_EXISTS).\n\nThe Idempotency-Key was already used with a different payload."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "The structured Error body identifies the failure with a stable code and optional typed details."
}
},
"security": [
{
"bearer": []
}
],
"summary": "CreateSnapshot checkpoints a running sandbox; a stopped source is rejected.",
"tags": [
"Snapshots"
],
"x-sbx-authenticated-only": false,
"x-sbx-conditional-permissions": [],
"x-sbx-error-responses": [
{
"code": "FAILED_PRECONDITION",
"description": "The Idempotency-Key was already used with a different payload."
}
],
"x-sbx-plane": "control",
"x-sbx-required-permissions": [
"snapshotsWrite"
],
"x-sbx-resource-response": {
"$ref": "#/components/schemas/Snapshot"
},
"x-sbx-serving-surface": "management"
}