Explicitly freeze observed background output into a new immutable result. Retrying creates another result; it never executes the command. No automatic capture, Activities record or idempotency key; GET /computers/{id}/results lists what the computer holds. Accepts an application/json object (including {}) of at most 4096 bytes. The total capture deadline is 60000 milliseconds. Capture starts at independent zero offsets, stops each stream at observed EOF or its requested cap, and stores the wrapper diagnostic once. This is a finite prefix from mutable guest paths, not an atomic snapshot or completion proof. Expiry is measured from capture_started_at. No query parameters or arbitrary metadata are accepted. A lost response may leave a committed result until expiry. Responses are no-store; Location is the relative metadata URL.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X POST "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/executions/exec_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4/retained-output' \
-H "Authorization: Bearer $MANDALA_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{}'
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
executionId = "exec_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"
c = client.computers.get(id)
result = c.retain_execution_output(executionId)
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const executionId = "exec_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4";
const c = await client.computers.get(id);
const result = await c.retainExecutionOutput(executionId);
console.log(JSON.stringify(result, null, 2));
The execution or recorded/current computer scope is unavailable.
409
The guest output cannot be read; no result is published (output_unavailable). It carries the host’s reason when it gave one: contention (its guest agent busy with another call) clears by itself. Also the computer’s or account’s retained quota is full (result_quota_exhausted, with reasoncomputer_quota or account_quota; no Retry-After: delete or wait out expiry).
429
Rate limit, or shared store capacity, free space or captures in progress (result_capacity, with Retry-After:60). Also result_capacity for 60 seconds after one of the account’s captures was stopped for falling below the progress floor (see 502) or ended unfinished while behind it: during that time the account’s new captures and artifact publishes are refused.
502
The source transfer or finite foundation protocol is invalid (capture_source_invalid). That includes a guest read that moves fewer than 64 KiB in any rolling 10 seconds, which is stopped; nothing is published.
503
Fresh scope, exclusive store ownership or storage is unavailable.
504
Capture deadline or cancellation; incomplete transfer is not published.
GET/computers/{id}/results/{resultId}
Read retained result metadatamember+
Member-only immutable metadata with recorded scope and fresh daemon computer metadata checks. No guest output, files, execution handle, wake or Activity capture. Retained reads have a 15000 millisecond total deadline. Current host unavailability prevents access even when bytes exist. Missing, expired, deleted and outside-scope results share 404. No query parameters. Reads do not extend expiry and all responses are no-store.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/results/res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6' \
-H "Authorization: Bearer $MANDALA_API_KEY"
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
resultId = "res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6"
c = client.computers.get(id)
result = c.result(resultId)
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const resultId = "res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6";
const c = await client.computers.get(id);
const result = await c.result(resultId);
console.log(JSON.stringify(result, null, 2));
A result_id from a retained exec (res_ followed by 32 lowercase hex characters).
Response
Finite recorded metadata. Digest identifies the bytes hashed at capture; bounded reads validate file type and size without rehashing the entire object.
Response fields
versionalways
1
result_idalways
string
kindalways
"background-output" or "synchronous-output"
statealways
"ready"
Bytes were published, not a statement of task success.
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope or local backing storage cannot be verified; never an empty ready result. A read that ran out of time can be sent again. But when a stored file or its record fails its check, or the file cannot be read, the result is withdrawn as this answer is given, if storage can record that: later reads and deletes answer 404. So retry this result first, and capture a new one only if the retry answers 404.
GET/computers/{id}/results
List retained results and quota usagemember+
Member-only list of the computer’s published, unexpired results, oldest first, with how full the computer’s and the account’s retained quotas are; a 15000 millisecond total deadline. Scoped like a per-id read: the caller’s own account, fresh current computer scope from its host, and for a workspace-scoped credential only results recorded in its workspace. An account-wide credential also sees results recorded before the computer moved workspace, each with the workspace_id it was recorded in: those are readable by nobody, and only an account owner may delete them. Captures in progress and deleted results awaiting cleanup are not listed but are charged in usage. Complete in one response: an account holds at most 2000 objects. No guest calls, wake or Activity capture; no query parameters; no-store. A host outage answers 503, never an empty list.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/results' \
-H "Authorization: Bearer $MANDALA_API_KEY"
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
c = client.computers.get(id)
result = c.results()
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const c = await client.computers.get(id);
const result = await c.results();
console.log(JSON.stringify(result, null, 2));
What the computer holds, and the quotas the next capture would meet.
Response fields
resultsalways
object[]
results[].result_idalways
string
results[].kindalways
"background-output" | "synchronous-output"
results[].bytesalways
integer
Its exact size: its retained stdout, stderr and diagnostic. Its quota charge is at least 4096 bytes (see usage).
results[].workspace_idalways
string or null
The workspace the result was recorded in. One that differs from the computer’s current workspace was recorded before a move: only an account owner on an account-wide credential may delete it, and nobody may read it.
results[].execution_idalways
string or null
The background execution it froze; null for synchronous output.
The computer is unavailable in the caller’s scope.
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope (scope_unavailable) or the private store (result_store_unavailable) is unavailable; never an empty list.
GET/computers/{id}/artifacts
List retained artifacts and quota usagemember+
Member-only list of the computer’s published, unexpired artifacts, oldest first, with how full the computer’s and the account’s retained quotas are; a 15000 millisecond total deadline. Scoped like a per-id read: the caller’s own account, fresh current computer scope from its host, and for a workspace-scoped credential only artifacts recorded in its workspace. An account-wide credential also sees artifacts recorded before the computer moved workspace, each with the workspace_id it was recorded in: those are readable by nobody, and only an account owner may delete them. Captures in progress and deleted artifacts awaiting cleanup are not listed but are charged in usage. Complete in one response: an account holds at most 2000 objects. No guest calls, wake or Activity capture; no query parameters; no-store. A host outage answers 503, never an empty list.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/artifacts' \
-H "Authorization: Bearer $MANDALA_API_KEY"
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
c = client.computers.get(id)
result = c.artifacts()
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const c = await client.computers.get(id);
const result = await c.artifacts();
console.log(JSON.stringify(result, null, 2));
405 Unsupported method on this public path; HEAD returns these headers without a body.
HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, POST, OPTIONS
{
"error": "method not allowed",
"request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}
Path parameters
idrequired
string
The computer id.
Response
What the computer holds, and the quotas the next publication would meet.
Response fields
artifactsalways
object[]
artifacts[].artifact_idalways
string
artifacts[].sizealways
integer
Its exact size in bytes. Its quota charge is at least 4096 bytes (see usage).
artifacts[].workspace_idalways
string or null
The workspace the artifact was recorded in. One that differs from the computer’s current workspace was recorded before a move: only an account owner on an account-wide credential may delete it, and nobody may read it.
artifacts[].execution_idalways
string or null
artifacts[].started_atalways
string
When its reservation began; expiry counts from here.
invalid_artifact_request: a query parameter was sent, or the computer id is not one (letters, digits, _ and -, at most 100 characters).
404
The computer is unavailable in the caller’s scope.
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope (scope_unavailable) or the private store (result_store_unavailable) is unavailable; never an empty list.
504
The read deadline or cancellation (artifact_timeout); send it again.
POST/computers/{id}/artifacts
Publish a nominated immutable artifactmember+
Explicitly capture one nominated guest file into immutable private retained storage. Accepts at most 32768 bytes of application/json and a 60000 millisecond control-plane deadline. The computer must already be running: one source file GET uses no_wake=1 and may touch guest activity. No automatic capture, shell, directory scan, Range assembly or retry on another host. Exact transferred bytes must match expected_size and expected_sha256; no prefix success. A live path may change or follow symlinks; digest matching is not an atomic snapshot or proof of who created a file. Optional execution_id must currently resolve on the same computer and recorded scope; its caller_selected association does not prove creation. Retrying creates another version; there is no idempotency key, but GET /computers/{id}/artifacts lists what the computer holds. created_at is final publication time; expiry starts at reservation and never renews on reads. All routes require member and refuse suspended accounts. Artifacts and retained output share one store quota: at most 128 MiB and 256 objects per computer, 512 MiB and 2000 objects per account, and 2 captures in progress per account, with at most 4 more still sending their body or awaiting their scope check. Each object is charged at least 4096 bytes, empty ones included: an artifact at expected_size from reservation, a retained-output capture at twice max_bytes_per_stream plus the diagnostic for background output, whichever is larger. A listing's usage counts that minimum, so it can exceed the sum of the listed sizes. Deleted objects stay charged until physical cleanup. An object recorded before a workspace move stays charged to its account but no longer to the moved computer. Past a computer or account quota the answer is 409 result_quota_exhausted, with reason computer_quota or account_quota and no Retry-After: it clears only when objects expire or are deleted, so list and delete rather than retry. When the platform store, free space or either captures limit is full, the answer is 429 result_capacity with Retry-After: 60, which clears by itself as other objects expire or captures finish. Once the platform store is full it is shared fairly: an account that, with the new object, would hold more than an equal share of it among the accounts holding objects is refused first, and for that account deleting its own objects is what helps. A guest transfer that falls below the progress floor (fewer than 64 KiB moved in any rolling 10 seconds), or cannot finish expected_size before the deadline at its recent rate, is stopped with 502 capture_source_invalid, and the account then gets that 429 for 60 seconds on new captures and publishes; so does a transfer that ends unfinished after at least a second while behind either pace, whoever ended it. No query parameters or caller metadata. A verified execution association may add a passive result link to its existing activity. Responses are no-store with a relative Location. Daemon guest transfer can outlive control-plane cancellation.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement. Prerequisite: /tmp/report.bin on the guest contains exactly Hello from Mandala. followed by one LF (20 bytes). The shown size and SHA-256 are calculated from those exact bytes. For another file calculate both from its actual bytes before publication.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X POST "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/artifacts' \
-H "Authorization: Bearer $MANDALA_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"path":"/tmp/report.bin","expected_size":20,"expected_sha256":"e953dd561c40b036816a668e57812df30c911543f3fb9127ac677a3183d31dde"}'
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import json, os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
body = json.loads("{\"path\":\"/tmp/report.bin\",\"expected_size\":20,\"expected_sha256\":\"e953dd561c40b036816a668e57812df30c911543f3fb9127ac677a3183d31dde\"}")
c = client.computers.get(id)
result = c.publish_artifact(body["path"], expected_size=body["expected_size"], expected_sha256=body["expected_sha256"])
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const body = {"path":"/tmp/report.bin","expected_size":20,"expected_sha256":"e953dd561c40b036816a668e57812df30c911543f3fb9127ac677a3183d31dde"};
const c = await client.computers.get(id);
const result = await c.publishArtifact(body.path, {expectedSize: body.expected_size, expectedSha256: body.expected_sha256});
console.log(JSON.stringify(result, null, 2));
405 Unsupported method on this public path; HEAD returns these headers without a body.
HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, POST, OPTIONS
{
"error": "method not allowed",
"request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}
Path parameters
idrequired
string
The computer id.
Request body
pathrequired
string
Exact OS-absolute guest path, at most 4096 UTF-8 bytes, valid Unicode with no controls/DEL. Spaces and Linux backslashes are preserved. At most 4096 characters.
expected_sizerequired
integer
0 to 67108864.
expected_sha256required
string
execution_id
string
max_bytes
integer
Expected size must not exceed this cap. Larger files require explicit opt-in above the default. 1 to 67108864. Default 8388608.
retention_seconds
integer
1 to 604800. Default 86400.
Response
Finite immutable artifact metadata, without source path, account attribution, command or raw content.
Response fields
artifact_idalways
string
kindalways
"artifact"
statealways
"ready"
computer_idalways
string
workspace_idalways
string or null
created_atalways
string
expires_atalways
string
sizealways
integer
sha256always
string
execution_associationalways
null or object
execution_association.kind
"caller_selected"
execution_association.execution_id
string
execution_association.verified_at
string
Failures
404
The source computer or the nominated guest file is unavailable (artifact_unavailable), or the execution_id does not resolve on this computer and scope (execution_unavailable).
409
The computer is not running or the source cannot be read now (artifact_source_unavailable), or the transferred size/digest differs from the nomination (artifact_mismatch), or the computer’s or account’s retained quota is full (result_quota_exhausted, with reasoncomputer_quota or account_quota; no Retry-After: delete or wait out expiry). artifact_source_unavailable carries the host’s reason when it gave one: contention (its guest agent busy with another call, a suspend or move in flight) clears by itself, and unavailable means the computer is not running.
Also, on a macOS computer: reason: "unsupported_on_macos", with the sentence “Artifacts are not supported on macOS computers.” Waiting does not change it. It is answered before anything is sent to the computer, and nothing is reserved or stored for it.
413
The body is over 32768 bytes (capture_request_too_large), or expected_size exceeds max_bytes, or the guest file is larger than the 64 MiB one guest file transfer carries (artifact_too_large). A file larger than expected_size but within that ceiling is a 409artifact_mismatch instead.
429
Rate limit, or shared store capacity, free space or captures in progress (result_capacity, with Retry-After:60).
502
Invalid or failed source transport (capture_source_invalid).
503
Current scope (scope_unavailable) or private store (result_store_unavailable) unavailable.
504
Capture deadline or cancellation (artifact_timeout); no incomplete object is published.
GET/computers/{id}/artifacts/{artifactId}
Read immutable artifact metadatamember+
Member-only retained metadata with original credential and fresh exact computer scope checks; a 15000 millisecond total deadline. No source path, execution handle, guest agent, wake or Activity capture. Stopped computers remain readable through daemon metadata; current host outage prevents access even when retained bytes exist. Unknown, foreign, expired and deleted artifacts share 404. Corrupt/missing retained files are unavailable, never empty success or a live fallback. No query parameters; no-store; expiry never renews.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/artifacts/art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5' \
-H "Authorization: Bearer $MANDALA_API_KEY"
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
artifactId = "art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5"
c = client.computers.get(id)
result = c.artifact(artifactId)
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const artifactId = "art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5";
const c = await client.computers.get(id);
const result = await c.artifact(artifactId);
console.log(JSON.stringify(result, null, 2));
An artifact_id from POST /computers/{id}/artifacts (art_ followed by 32 lowercase hex characters).
Response
The immutable manifest. Digest identifies capture bytes; reads verify file type/layout/size without a full checksum scan.
Response fields
artifact_idalways
string
kindalways
"artifact"
statealways
"ready"
computer_idalways
string
workspace_idalways
string or null
created_atalways
string
expires_atalways
string
sizealways
integer
sha256always
string
execution_associationalways
null or object
execution_association.kind
"caller_selected"
execution_association.execution_id
string
execution_association.verified_at
string
Failures
400
invalid_artifact_request: the artifact id is not art_ followed by 32 lowercase hex characters, the computer id is not one (letters, digits, _ and -, at most 100 characters), a query parameter was sent, or the request carried a body. Checked before any lookup; a well-formed artifact id that does not exist is a 404.
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope or local backing storage cannot be verified; never an empty success. But when a stored file or its record fails its check, or the file cannot be read, the artifact is withdrawn as this answer is given, if storage can record that: later reads and deletes answer 404. So retry this artifact first, and capture a new one only if the retry answers 404.
Full retained binary download, at most 67108864 bytes with a 60000 millisecond overall budget. No guest or execution calls. Shared read slots/pins remain held through stream and pending local I/O completion. Backpressure queues at most one 64-KiB payload chunk. A client that reads fewer than 64 KiB in any rolling 10 seconds has the stream ended early, its read slot freed and the artifact kept: compare the bytes received with Content-Length, and retry with a reader that keeps up. Original authority and current row/generation/expiry are checked before enqueue; fresh exact computer scope is required after one second or one MiB, whichever first. Revocation cannot retract already delivered or queued bytes. Errors after headers terminate the stream; a chunk that fails its check or cannot be read also withdraws the artifact, if storage can record that: retry it, and capture a new one only if the retry answers 404. Content-Length is exact, Content-Disposition is a generated art_<hex>.bin attachment, with nosniff, no-store and Accept-Ranges:none. Incoming Range is ignored with a full 200 response. No query parameters.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/artifacts/art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5/download' \
-H "Authorization: Bearer $MANDALA_API_KEY" \
-o download.bin
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from pathlib import Path
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
artifactId = "art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5"
c = client.computers.get(id)
result = c.download_artifact(artifactId, max_bytes=64 * 1024 * 1024)
Path("download.bin").write_bytes(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
import { writeFile } from "node:fs/promises";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const artifactId = "art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5";
const c = await client.computers.get(id);
const result = await c.downloadArtifact(artifactId, {maxBytes: 64 * 1024 * 1024});
await writeFile("download.bin", result);
200 Raw retained artifact bytes, including final LF.
HTTP 200
Content-Type: application/octet-stream
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Content-Length: 20
Content-Disposition: attachment; filename="art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5.bin"
Accept-Ranges: none
Cache-Control: no-store
X-Content-Type-Options: nosniff
Raw bytes (UTF-8 shown literally; includes any final newline):
Hello from Mandala.
An artifact_id from POST /computers/{id}/artifacts (art_ followed by 32 lowercase hex characters).
Response
Raw immutable bytes, never base64 or an inline preview.
Failures
400
invalid_artifact_request: the artifact id is not art_ followed by 32 lowercase hex characters, the computer id is not one (letters, digits, _ and -, at most 100 characters), a query parameter was sent, or the request carried a body. Checked before any lookup; a well-formed artifact id that does not exist is a 404.
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope or local backing storage cannot be verified; never an empty success. But when a stored file or its record fails its check, or the file cannot be read, the artifact is withdrawn as this answer is given, if storage can record that: later reads and deletes answer 404. So retry this artifact first, and capture a new one only if the retry answers 404.
DELETE/computers/{id}/artifacts/{artifactId}
Delete an immutable artifactmember+
Member-only durable tombstone after original credential and fresh recorded/current computer scope checks. No guest calls, body or query. Repeated deletes and reads return 404. Physical cleanup remains charged until descriptors and files are removed. Suspended accounts are refused; no-store. An artifact recorded before its computer moved workspace is readable by nobody; an account owner on an account-wide credential may still delete it, and every other caller gets 404.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X DELETE "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/artifacts/art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5' \
-H "Authorization: Bearer $MANDALA_API_KEY"
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
artifactId = "art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5"
c = client.computers.get(id)
result = c.delete_artifact(artifactId)
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const artifactId = "art_b2c3d4e5b2c3d4e5b2c3d4e5b2c3d4e5";
const c = await client.computers.get(id);
const result = await c.deleteArtifact(artifactId);
console.log(JSON.stringify(result, null, 2));
204 204 No Content
HTTP 204 No Content
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Cache-Control: no-store
An artifact_id from POST /computers/{id}/artifacts (art_ followed by 32 lowercase hex characters).
Response
No response body; later artifact reads are unavailable.
Failures
400
invalid_artifact_request: the artifact id is not art_ followed by 32 lowercase hex characters, the computer id is not one (letters, digits, _ and -, at most 100 characters), a query parameter was sent, or the request carried a body. Checked before any lookup; a well-formed artifact id that does not exist is a 404.
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope or local backing storage cannot be verified, and the artifact may be left in place: send the delete again until it answers 204 or 404. When its stored record failed its check, the artifact is withdrawn as this answer is given if storage can record that, and the resend answers 404.
GET/computers/{id}/results/{resultId}/output
Read an independent retained byte rangemember+
One bounded raw byte range from immutable control-plane storage, with fresh authorization before and after the read. No guest or execution-handle calls. Independent retries never consume a cursor or change expiry. At or beyond retained EOF the body is empty, next offset is unchanged and EOF is true. Unknown or duplicate query parameters and unsafe offset+limit are refused. Range headers are not supported. Response headers: X-Result-Offset (requested byte offset), X-Result-Next-Offset (offset plus returned bytes), X-Result-EOF (true or false for the retained stream), exact Content-Length, attachment Content-Disposition with a generated filename, nosniff and no-store.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/results/res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6/output?stream=stdout&offset=0' \
-H "Authorization: Bearer $MANDALA_API_KEY" \
-o download.bin
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from pathlib import Path
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
resultId = "res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6"
query = {"stream":"stdout","offset":"0"}
c = client.computers.get(id)
result = c.result_output(resultId, stream=query["stream"], offset=int(query["offset"]))
Path("download.bin").write_bytes(result.data)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
import { writeFile } from "node:fs/promises";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const resultId = "res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6";
const query = {"stream":"stdout","offset":"0"};
const c = await client.computers.get(id);
const result = await c.resultOutput(resultId, {stream: "stdout", offset: Number(query.offset)});
await writeFile("download.bin", result.bytes);
200 Raw retained stdout prefix bytes for stream=stdout&offset=0.
HTTP 200
Content-Type: application/octet-stream
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
X-Result-Offset: 0
X-Result-Next-Offset: 20
X-Result-EOF: true
Content-Length: 20
Content-Disposition: attachment; filename="res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6.stdout.bin"
Cache-Control: no-store
X-Content-Type-Options: nosniff
Raw bytes (UTF-8 shown literally; includes any final newline):
Hello from Mandala.
A result_id from a retained exec (res_ followed by 32 lowercase hex characters).
Query parameters
streamrequired
string
The retained stream to read. Synchronous output has no diagnostic; requesting it returns result_stream_unavailable 409.
offsetrequired
integer
Explicit nonnegative decimal byte offset; offset plus limit must be a safe integer. 0 to 9007199254740990.
limit
integer
Maximum response bytes. 1 to 65536. Default 65536.
Response
Raw bytes, never base64. EOF describes the retained prefix only.
Failures
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope or local backing storage cannot be verified; never an empty ready result. A read that ran out of time can be sent again. But when a stored file or its record fails its check, or the file cannot be read, the result is withdrawn as this answer is given, if storage can record that: later reads and deletes answer 404. So retry this result first, and capture a new one only if the retry answers 404.
DELETE/computers/{id}/results/{resultId}
Delete a retained resultmember+
Member-only logical deletion after recorded and fresh current scope checks. No body or query. Later reads and repeated deletes return 404. Physical cleanup is bounded and remains charged until confirmed removal. No guest work; host outage returns unavailable rather than guessing access. Responses are no-store. A result recorded before its computer moved workspace is readable by nobody; an account owner on an account-wide credential may still delete it, and every other caller gets 404.
Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials. SDK setup first GETs the computer. Python start/stop/suspend/restart also refresh it with another GET; TypeScript refreshes only if the action returns an acknowledgement.
curl
base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X DELETE "${base_url%/}"'/computers/vm-a1b2c3d4e5f6/results/res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6' \
-H "Authorization: Bearer $MANDALA_API_KEY"
Python — Mandala SDK 0.27.0
# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client
with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
id = "vm-a1b2c3d4e5f6"
resultId = "res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6"
c = client.computers.get(id)
result = c.delete_result(resultId)
print(result)
TypeScript — Mandala SDK 0.27.0
// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";
const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "vm-a1b2c3d4e5f6";
const resultId = "res_c3d4e5f6c3d4e5f6c3d4e5f6c3d4e5f6";
const c = await client.computers.get(id);
const result = await c.deleteResult(resultId);
console.log(JSON.stringify(result, null, 2));
204 204 No Content
HTTP 204 No Content
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Cache-Control: no-store
A result_id from a retained exec (res_ followed by 32 lowercase hex characters).
Response
No response body; the result is logically unavailable.
Failures
429
Also result_capacity with Retry-After: 60 when 4 reads of retained results and artifacts are already in flight for this account, or 32 across the platform; a read is refused rather than queued.
503
Current scope or local backing storage cannot be verified, and the result may be left in place: send the delete again until it answers 204 or 404. When its stored record failed its check, the result is withdrawn as this answer is given if storage can record that, and the resend answers 404.