Operations

Get an operation

One operation, brought up to date: poll this until state is succeeded or failed. An id this credential cannot see is a 404, the same as one that never existed or has expired — another account’s, and for an API key confined to a workspace, one about a computer outside it. It takes no query parameters, and any is a 400.

A clone’s host is asked about its computer when this is read. If the host does not answer in time, the operation is answered as last observed rather than as an error.

Requires the viewer role or higher.

get/operations/{id}

Request

  • Base URL: https://app.mandala.computer/api/v1
  • URL: https://app.mandala.computer/api/v1/operations/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The operation id.

Response

The operation.

idstring required

op_ and 24 hex characters: the operation_id a lifecycle call answered with.

kind'create' | 'clone' | 'start' | 'stop' | 'suspend' | 'restart' | 'restore' | 'resize' | 'move' | 'delete' required

The call that started it. clone is either clone; resize is a PATCH /computers/{id} that resized; move is POST /computers/{id}/move; delete is DELETE /computers/{id}, succeeded once it was accepted (its answer says what was removed and what of a purge is still queued). More kinds may be added — treat one you do not know as opaque rather than as an error.

computer_idstring nullable required

The computer it is about — for a create or a clone, the new one. null only for a restore whose computer could not be named when it was recorded.

state'pending' | 'running' | 'succeeded' | 'failed' required

pending (accepted, nothing of the computer’s has changed yet — a move still getting its target ready, or a call whose Idempotency-Key reserved it and whose answer has not arrived), running, succeeded or failed. The last two are final.

succeeded means the platform finished the step this call answers for: the guest was started, the disk was copied, the move landed at the new size. It does not mean the desktop inside has finished booting.

idempotency_keystring nullable required

The Idempotency-Key the call that started it was sent with, and null for a call sent without one. GET /operations?idempotency_key= finds it by this when asked with a credential of the same scope as that call’s, since keys are kept per scope.

created_atstring required

RFC 3339 timestamp of when the call was answered — or, for a call sent with an Idempotency-Key, of when it was received, since it is recorded before it is carried out.

updated_atstring required

RFC 3339 timestamp of the last change of state or error.

finished_atstring nullable required

RFC 3339 timestamp, null while it is live. For a clone, when the platform saw the copy end, which can trail the end itself by up to a minute.

Changes

No recorded changes to this operation across all 1 revision of this API.