HTTP API
Tasks, queues and storage
29 routes your API key can call. Each says who may call it; every example assumes KEY is your API key. What only the dashboard does (signing in, making API keys, connecting accounts) isn't listed here: it's in the full OpenAPI spec.
/v1/workspaces/{wid}/tasks/{tid}A task, with its sandboxes, checkpoints and one page of its journal
People and API keys
A task is the work a journal follows across sandboxes: every sandbox gets one when it starts, and a resumed sandbox joins its checkpoint's. sandboxes and checkpoints are the newest 100 of each; journal is newest first, paged by page and perPage, and meta describes the journal.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
taskobjectrequiredidstringsandboxesSandbox[]checkpointsCheckpoint[]journalJournalEntry[]secret_groupsSecretRef[]What the task's new sandboxes get (a resume, or fan-out), in order
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/secret_groupsChange the secret groups a task's future sandboxes get
People and API keys
A resume, or a sandbox started with task, gets these groups' current values. Running sandboxes keep what they started with. An API key may add only groups it was granted (keeping or dropping any). A task token: 403.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Body
secret_groupsstring[]required
Answer · 200
secret_groupsSecretRef[]requiredidstringnamestringversionintegerGoes up with every change to the group's values
curl -X PUT 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/secret_groups' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"secret_groups":["…"]}'/v1/workspaces/{wid}/tasks/{tid}/queues/{name}/messagesPush a message onto one of the task's queues
People, API keys and the sandbox's own task token
Queues are coordination, not storage: they live in Redis only and expire with everything else of the task 7 days after its last activity. Write results to the key-value store, which is kept in Postgres and survives Redis being wiped, for as long as that; keep them longer in your own files. A queue is made by its first push; a task has 100 at most, each 100,000 messages at most (409 past it). Idempotency-Key: the same key and body within 24 hours returns the first message (200, Idempotent-Replayed: true); the same key with another body is 409.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
name | Inpath | Typestring | AboutQueue name |
Idempotency-Key? | Inheader | Typestring | About |
Body
bodyobjectrequiredAny JSON value, 256 KiB at most once compacted
Answer · 200
Replayed for a repeated Idempotency-Key
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/queues/name/messages' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"body":{}}'/v1/workspaces/{wid}/tasks/{tid}/queues/{name}/claimClaim up to max messages, hidden from other claims for visibility_seconds
People, API keys and the sandbox's own task token
Messages whose claim ran out (or were released) come first, then new ones, oldest first. A claimed message not acked before claimed_until comes back for another claim; one claimed 5 times and never acked goes to the queue's dead list instead. An empty list means nothing is waiting now. The body may be left out.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
name | Inpath | Typestring | AboutQueue name |
Body
maxintegervisibility_secondsinteger
Answer · 200
messagesMessage[]requiredidstringqueuestringbodyobjectThe JSON pushed (claims and dead messages only)
attemptsintegerTimes claimed
enqueued_atstringclaimed_untilstringClaims only: when it can be claimed again unless acked
died_atstringDead messages only
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/queues/name/claim' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"max":1,"visibility_seconds":300}'/v1/workspaces/{wid}/tasks/{tid}/queues/{name}/messages/{mid}/ackDone with a claimed message; it is gone for good (send Content-Type application/json, no body)
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
name | Inpath | Typestring | AboutQueue name |
mid | Inpath | Typestring | AboutMessage id (msg_…) |
Answer · 204
Acked
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/queues/name/messages/mid/ack' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/queues/{name}/messages/{mid}/releaseGive a claimed message back now, for another claim
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
name | Inpath | Typestring | AboutQueue name |
mid | Inpath | Typestring | AboutMessage id (msg_…) |
Answer · 204
Released
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/queues/name/messages/mid/release' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/queuesOne page of the task's queues, by name, with their counts
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
queuesQueue[]requirednamestringdepthintegerWaiting to be claimed
in_flightintegerClaimed, not yet acked
deadintegerClaimed 5 times and never acked
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/queues' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/queues/{name}/deadOne page of a queue's dead messages, oldest first (the newest 10,000 are kept)
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
name | Inpath | Typestring | AboutQueue name |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
messagesMessage[]requiredidstringqueuestringbodyobjectThe JSON pushed (claims and dead messages only)
attemptsintegerTimes claimed
enqueued_atstringclaimed_untilstringClaims only: when it can be claimed again unless acked
died_atstringDead messages only
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/queues/name/dead' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasksThe workspace's tasks, the one with the newest activity first, each summed from its sandboxes
People and API keys
A task is the work a journal follows across machines: every sandbox started with the same task, and those a resume or carrying on starts. active counts its running, paused, pausing and resuming sandboxes; cost_micros is what they cost so far. Members and API keys. MCP: task_journal list.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
tasksobject[]requiredidstringsandboxesintegeractiveintegerprovidersstring[]started_atstringlast_activity_atstringcost_microsinteger
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/webhooksThe task's inbound webhooks, newest first, with how many calls each took
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Answer · 200
webhooksobject[]requiredidstringtaskstringnamestringqueuestringdeliver"sandbox" | "queue"commandstringwakebooleanurlstringOnly in the answer that made it: Annex keeps only a hash
created_atstringlast_delivery_atstring | nulldeliveriesinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/webhooks' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/webhooksMake an inbound webhook for the task
People, API keys and the sandbox's own task token
A secret URL (/hooks/anx_hook_…, answered in this response only) that any service may call. Each call goes on the task's queue in Redis and is answered 202 at once; with deliver sandbox (the default) Annex then writes it into the task's newest running sandbox as /tmp/annex-inbox/<webhook id>/<message id>.json and runs command there if set (the call on stdin, ANNEX_WEBHOOK_FILE set; tried again until it exits 0, 5 times at most); with deliver queue it waits there for the agent to claim. Members, API keys and the task's own sandboxes (task token). 20 per task.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Body
namestringdeliver"sandbox" | "queue"commandstringwakebooleandeliver sandbox only: resume the task's newest paused sandbox when a call finds none running
queuestringdeliver queue only: webhooks if left out. A sandbox webhook has a queue of its own, named after it (422 if one is named)
Answer · 201
webhookobjectrequiredidstringtaskstringnamestringqueuestringdeliver"sandbox" | "queue"commandstringwakebooleanurlstringOnly in the answer that made it: Annex keeps only a hash
created_atstringlast_delivery_atstring | nulldeliveriesinteger
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/webhooks' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"name":"…","deliver":"sandbox"}'/v1/workspaces/{wid}/tasks/{tid}/webhooks/{hid}Turn a webhook off; its URL is refused from then on (within a minute on every server)
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
hid | Inpath | Typestring | About |
Answer · 204
Turned off
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/webhooks/hid' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/runsThe task's runs, newest first
People, API keys and the sandbox's own task token
Annex records each webhook call as a run on its own, with no change to the agent: queued (waiting for a running sandbox, or for the agent to claim it), running (written into a sandbox, or claimed by the agent), succeeded (the webhook's command exited 0, or the agent acked it), delivered (written into the sandbox with no command, so Annex can't see the outcome), failed (tried 5 times: on the queue's dead list). Members, API keys and the task's own sandboxes (task token). MCP: task_run list.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
runsobject[]requiredidstringtaskstringtrigger"webhook" | "agent"webhookstringnamestringmessagestringstatus"queued" | "running" | "stuck" | "delivered" | "succeeded" | "failed" | "cancelled"sandboxstringattemptsintegerexit_codeinteger | nullerrorstringreceived_atstringstarted_atstring | nullended_atstring | nulllast_seen_atstring | nullwait_msinteger | nullduration_msinteger | nullresultstringmay_have_run_twicebooleanreplay_ofstringagent_cost_microsinteger
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/runsStart a run of the agent's own
People, API keys and the sandbox's own task token
The agent records work that no webhook started (a scheduled job, a step of a plan) and reports on it with events, heartbeats and finish. timeout_seconds (30 to 86400, 600 by default) is how long it may go quiet before it is stuck. MCP: task_run start.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Body
namestringrequiredtimeout_secondsinteger
Answer · 201
runobjectrequired
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"name":"…"}'/v1/workspaces/{wid}/tasks/{tid}/runs/{rid}One run with its events and cost
People, API keys and the sandbox's own task token
events are each attempt, why one failed and the task's journal lines from its sandbox while it ran (500 at most). cost_micros is what the sandboxes it ran on cost from its start to its end, shared with anything else running there then. MCP: task_run get.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
rid | Inpath | Typestring | About |
Answer · 200
runobjectrequiredidstringtaskstringtrigger"webhook" | "agent"webhookstringnamestringmessagestringstatus"queued" | "running" | "stuck" | "delivered" | "succeeded" | "failed" | "cancelled"sandboxstringattemptsintegerexit_codeinteger | nullerrorstringreceived_atstringstarted_atstring | nullended_atstring | nulllast_seen_atstring | nullwait_msinteger | nullduration_msinteger | nullresultstringmay_have_run_twicebooleanreplay_ofstringagent_cost_microsintegercost_microsintegereventsobject[]
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs/rid' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/runs/{rid}/eventsAdd an event the agent reports to a run
People, API keys and the sandbox's own task token
kind is step, tool, log, error, usage or the agent's own word (lowercase, 32 characters); text 2,000 characters at most, with the sandbox's secret values taken out; cost_micros is what the step cost apart from sandboxes, added to agent_cost_micros. A delivered or stuck run is running again. 409 once it has ended, or past 1,000 events. MCP: task_run event.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
rid | Inpath | Typestring | About |
Body
kindstringrequiredtextstringcost_microsinteger
Answer · 200
runobjectrequired
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs/rid/events' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"kind":"…"}'/v1/workspaces/{wid}/tasks/{tid}/runs/{rid}/heartbeatSay the agent is still working on a run
People, API keys and the sandbox's own task token
Keeps it from going stuck (timeout_seconds changes how long it may go quiet) and keeps the queue claim of the call it works on for another window. The answer says cancel true once the run was cancelled: stop working on it. MCP: task_run heartbeat.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
rid | Inpath | Typestring | About |
Body
timeout_secondsinteger
Answer · 200
statusstringcancelboolean
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs/rid/heartbeat' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"timeout_seconds":1}'/v1/workspaces/{wid}/tasks/{tid}/runs/{rid}/finishEnd a run as the agent says
People, API keys and the sandbox's own task token
status succeeded or failed, with a short result or error (2,000 characters each) and cost_micros. 409 once it has ended. MCP: task_run finish.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
rid | Inpath | Typestring | About |
Body
status"succeeded" | "failed"requiredresultstringerrorstringcost_microsinteger
Answer · 200
runobjectrequired
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs/rid/finish' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"status":"succeeded"}'/v1/workspaces/{wid}/tasks/{tid}/runs/{rid}/cancelCancel a run
People, API keys and the sandbox's own task token
A waiting call is handed to no one, a claimed one is acked when next claimed, a webhook command running for it is stopped within 2 seconds, and the agent's next heartbeat answers cancel true. 409 once it has ended. MCP: task_run cancel.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
rid | Inpath | Typestring | About |
Answer · 200
runobjectrequired
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs/rid/cancel' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/runs/{rid}/replaySend a webhook call again as a new run
People, API keys and the sandbox's own task token
The call's message is kept 7 days; its webhook must still be on. Answers the new run (replay_of names this one). 409 otherwise. MCP: task_run replay.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
rid | Inpath | Typestring | About |
Answer · 201
runobjectrequired
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/runs/rid/replay' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/run-subscriptionsThe URLs the task's run events go to, with each one's last try
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Answer · 200
run_subscriptionsRunSubscription[]requiredidstringtaskstringurlstringeventsstring[]secretstringOnly in the answer that made it
created_atstringlast_attempt_atstring | nulllast_statusintegerlast_errorstring
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/run-subscriptions' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/run-subscriptionsSend the task's run events to a URL
People, API keys and the sandbox's own task token
Each status change (run.started, run.succeeded, run.failed, run.stuck, run.cancelled, run.delivered; all if events is left out) is POSTed as {id, type, created_at, run} with Annex-Event and Annex-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>" keyed with secret>. Any 2xx counts; otherwise it is tried 3 more times over about 6 minutes, kept in Postgres meanwhile, so a restart drops none. https only; public addresses only. secret is in this answer only. 5 per task. MCP: task_run_subscription create.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Body
urlstringrequiredeventsstring[]
Answer · 201
run_subscriptionRunSubscriptionrequiredidstringtaskstringurlstringeventsstring[]secretstringOnly in the answer that made it
created_atstringlast_attempt_atstring | nulllast_statusintegerlast_errorstring
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/run-subscriptions' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"url":"…"}'/v1/workspaces/{wid}/tasks/{tid}/run-subscriptions/{sid}Stop sending run events to a URL
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
sid | Inpath | Typestring | About |
Answer · 204
Removed
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/run-subscriptions/sid' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/kvOne page of the task's keys starting with prefix, in key order, with their values
People, API keys and the sandbox's own task token
Kept in Postgres (Redis only caches it), so it survives Redis being wiped; everything of a task expires 7 days after its last activity. A task holds 10,000 keys at most. Key order is byte order.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
prefix? | Inquery | Typestring | About |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
kvKV[]requiredkeystringvalueobjectAny JSON value
versionintegerCounts the key's writes and deletes, from 1, and never goes back; match it with If-Match
updated_atstring
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/kv' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/kv/{key}One key, with an ETag of its version
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
key | Inpath | Typestring | AboutMay hold slashes, like results/7 |
Answer · 200
kvKVrequiredkeystringvalueobjectAny JSON value
versionintegerCounts the key's writes and deletes, from 1, and never goes back; match it with If-Match
updated_atstring
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/kv/key' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/kv/{key}Write a key; with If-Match, only if it is still at that version
People, API keys and the sandbox's own task token
If-Match "3" writes only if the key is at version 3, and "0" only if it doesn't exist yet; otherwise 412 precondition_failed: read it again and retry. Without If-Match it always writes. A version counts the key's writes and deletes and never goes back: a key deleted and made again goes on from where it was, so an If-Match read before the delete never matches. 409 past 10,000 keys.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
key | Inpath | Typestring | AboutMay hold slashes, like results/7 |
If-Match? | Inheader | Typestring | About |
Body
valueobjectrequiredAny JSON value, 64 KiB at most once compacted
Answer · 200
kvKVrequiredkeystringvalueobjectAny JSON value
versionintegerCounts the key's writes and deletes, from 1, and never goes back; match it with If-Match
updated_atstring
curl -X PUT 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/kv/key' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"value":{}}'/v1/workspaces/{wid}/tasks/{tid}/kv/{key}People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
key | Inpath | Typestring | AboutMay hold slashes, like results/7 |
Answer · 204
Deleted
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/kv/key' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/token/refreshKeep the calling sandbox's task token for 24 hours more (task tokens only; an API key gets 403)
People, API keys and the sandbox's own task token
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Answer · 200
task_tokenobjectrequiredexpires_atstring
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/token/refresh' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/tasks/{tid}/heartbeatThe calling sandbox is alive (task tokens only; an API key gets 403)
People, API keys and the sandbox's own task token
Sent every 5 s by a loop Annex starts inside the sandbox; each beat keeps it counted alive for 15 s. A heartbeat that stops never marks a sandbox lost by itself: Annex then asks its provider. 410 gone means stop beating: nothing has used the sandbox through Annex for an hour.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
tid | Inpath | Typestring | AboutTask id |
Answer · 204
Keep beating
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/heartbeat' \
-H 'Authorization: Bearer anx_live_…'