Cubicle

Get an operation

GET
/v1/operations/{operation}

Returns one exec, snapshot or restore operation. Poll it after Run a command, Take a snapshot or Restore a Box until its state is done, failed or unknown. See Following a request.

Any active member of the operation's organization may read it, without a grant on the Box, also after the Box is deleted. API keys may read only their own organization's operations. An exec's result is null unless the caller requested it.

See Commands and operations.

Authorization

headerAuthorizationBearer <token>

A service account API key (cbk_…), used directly as the bearer token. read keys may call only GET routes.

Path Parameters

operation*string

The operation's ID, from the response that created it.

Formatuuid

Response Body

The operation.

application/json
  1. response
id*string

The operation's ID.

boxId*string

The ID of the Box it runs on.

type*string

exec for a command, snapshot or restore.

Value in"exec""snapshot""restore"
state*OperationState

pending until the Box's Node picks it up, then running, and finally done, failed or unknown. unknown means it was interrupted and its outcome is not known; it is never retried.

Value in"pending""running""done""failed""unknown"
attempt*number

How many times a Node has picked it up: 0 while pending, then 1.

progress*|

Reserved for progress notes. Current Nodes do not send any, so it is null.

result*unknown

null until done. A done exec holds an ExecResult, shown only to the member who requested it and null for everyone else. A done restore holds { "snapshotId": … }. A done snapshot holds an internal manifest; read the snapshot from the Box's snapshot list instead.

error*|

Why it failed or became unknown; otherwise null.

createdAt*string

When it was requested.

startedAt*|

When a Node picked it up, or null while pending.

completedAt*|

When it reached done, failed or unknown, or null before.

Example Request
curl -X GET 'https://api.cubicle.sh/v1/operations/9d2e4f6a-1b3c-4d5e-8f7a-6b8c0d2e4f1a'
Example Response
{  "id": "9d2e4f6a-1b3c-4d5e-8f7a-6b8c0d2e4f1a",  "boxId": "0f6c2a5e-3b1d-4c8e-9a7f-2d4e6b8c1a3f",  "type": "exec",  "state": "done",  "attempt": 1,  "progress": null,  "result": {    "exitCode": 0,    "stdout": "Linux box-job-1 6.12.8 #1 SMP x86_64 GNU/Linux\n",    "stderr": "",    "timedOut": false,    "truncated": false  },  "error": null,  "createdAt": "2026-11-05T10:16:00.000Z",  "startedAt": "2026-11-05T10:16:00.400Z",  "completedAt": "2026-11-05T10:16:00.900Z"}