Get an 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.
AuthorizationBearer <token>A service account API key (cbk_…), used directly as the bearer token. read keys may call only GET routes.
operation*stringThe operation's ID, from the response that created it.
uuidThe operation.
application/json- response
id*stringThe operation's ID.
boxId*stringThe ID of the Box it runs on.
type*stringexec for a command, snapshot or restore.
"exec""snapshot""restore"state*OperationStatepending 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.
"pending""running""done""failed""unknown"attempt*numberHow 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*unknownnull 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*stringWhen 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.
curl -X GET 'https://api.cubicle.sh/v1/operations/9d2e4f6a-1b3c-4d5e-8f7a-6b8c0d2e4f1a'{ "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"}
