Operations

List operations

The operations this account’s lifecycle calls started, newest first. Every accepted create, clone, start, stop, suspend, restart, snapshot restore, resize, move and delete records one and answers its id as operation_id. Absent, with the call still done, in the rare case the operation could not be recorded; a client must not treat its absence as a failure of the call. A call that was refused records nothing, since its error is its outcome. Operations are kept for 7 days from when they were recorded.

A call sent with an Idempotency-Key is recorded pending BEFORE it is carried out, so idempotency_key=, asked with a credential of the same scope, finds it even when its answer never reached you: it ends as its answer says, is removed if the call was refused, and ends failed with error.code: "lost" if the platform never learned how it went. A start, stop, suspend or restart sent without one whose host did not answer in time is recorded too, already failed with error.code: "lost", and its 503 names it; read the computer to see whether it took effect.

Most finish before their call answers and are recorded succeeded. A clone is running until its disk is copied, and a move until it lands. A move is brought up to date as you read it, and so is a clone, by asking its host — but only when it is among the first 5 unfinished operations on the page other than moves, newest first. A clone further down is answered as last observed; GET /operations/{id} brings it up to date.

An API key issued against a workspace sees the operations of computers in that workspace only — whoever can read a computer can read its operations, and nobody else.

The same calls made from the dashboard are recorded and listed here too, on the same terms, except a move.

Requires the viewer role or higher.

get/operations

Request

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

Query parameters

computer_idstring

Only this computer’s operations. For a clone, that is the new computer. A value no computer id could be is a 400.

idempotency_keystring

Only the operation the call sent with this Idempotency-Key recorded, within the key’s 24 hours. Keys are kept per scope, so this finds the operation that a credential of your own scope reserved with the key. An operation recorded under the same key by a credential of another scope (another workspace’s, or a workspace’s when you ask with an account-wide key) is not found by it, even when the unfiltered listing shows it. A value no key could be is a 400.

limitinteger

How many to answer.

cursorstring

The next_cursor of the page before. A cursor this credential cannot read — another scope’s, one whose operation has expired, or one never given out — is a 400. An unknown parameter, or one given twice, is a 400.

Response

A page of operations, newest first.

next_cursorstring nullable required

Pass as cursor for the page after this one; null on the last page.

Changes

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