HTTP API
Other
7 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/keyWhich workspace an API key is for
People and API keys
For a tool that was given only a key. A person's session gets 403.
Answer · 200
keyobjectrequiredidstringkind"key" | "device"device: a desktop app's access token
workspaceobject
curl -X GET 'https://annex.eversonder.com/v1/key' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/templatesThe workspace's templates, by name
People and API keys
A template is what new sandboxes start as: a size, a route and set-up commands Annex runs in each new sandbox before handing it over. It names no provider's image, so it works on every provider; the commands run again in every sandbox started from it. One template may be the workspace's default.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
Answer · 200
templatesTemplate[]requiredidstringnamestringdescriptionstringroutestringregionstringvcpuintegermemory_gibintegersetupstring[]secret_groupsstring[]defaultbooleanalways_runbooleancreated_atstringupdated_atstring
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/templates' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/templatesSave a template under its name
People and API keys
A new template (201), or the one of that name replaced whole (200). At most 50 a workspace.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
Body
namestringrequiredLower-case letters, digits and dashes, such as node-dev; not "none"
descriptionstringroutestring"cheapest", "fastest" or a provider name; empty leaves it to each start
regionstringA region code; empty for anywhere
vcpuinteger0 leaves it to each start
memory_gibinteger0 leaves it to each start
setupstring[]Shell commands run in order in a new sandbox; the first that fails stops the rest. After the first run Annex saves the files they changed and puts them back in later sandboxes of the same kind instead of running them again, unless
always_runis truesecret_groupsstring[]Secret groups added to each sandbox's environment
defaultbooleanEvery start in the workspace uses it unless the request names another template, or "none"
always_runbooleanRun the set-up commands in every sandbox and never reuse their saved result. For a set-up that starts a program: a saved result holds files, not running programs
Answer · 200
templateTemplateidstringnamestringdescriptionstringroutestringregionstringvcpuintegermemory_gibintegersetupstring[]secret_groupsstring[]defaultbooleanalways_runbooleancreated_atstringupdated_atstring
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/templates' \
-H 'Authorization: Bearer anx_live_…' \
-H 'Content-Type: application/json' \
-d '{"name":"…"}'/v1/workspaces/{wid}/templates/{name}One template
People and API keys
Answer · 200
templateTemplateidstringnamestringdescriptionstringroutestringregionstringvcpuintegermemory_gibintegersetupstring[]secret_groupsstring[]defaultbooleanalways_runbooleancreated_atstringupdated_atstring
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/templates/name' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/templates/{name}Delete a template
People and API keys
Sandboxes already started from it keep what they have.
Answer · 204
Deleted
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/templates/name' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/creditsThe workspace's Annex credit, for sandboxes on Annex's own provider accounts
People and API keys
With Annex credit a sandbox can start on Annex's own account at a provider (its connection is annex:<provider>) when the workspace has no account of its own there, or its own can't take it: its own accounts are always tried first. balance_micros is what came in less what those sandboxes cost at their rates, to now; Annex stops them once it reaches 0, so it can dip a minute's cost below. Members and API keys.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
Answer · 200
creditsCreditsrequiredbalance_microsintegerWhat is left, in micro-dollars. Annex stops its sandboxes when 2 minutes of what they burn is left, so it stays above 0
held_microsintegerHeld for the sandboxes on Annex's accounts running now: their first 10 minutes each
free_microsintegerbalance_microslessheld_micros: a new sandbox on Annex's account needs 10 minutes of its price free to startin_microsintegerEvery grant
spent_microsintegerWhat sandboxes on Annex's own accounts cost
currencystringprovidersstring[]Where Annex has an account of its own
can_buybooleanTop-ups are set up on this server
entriesobject[]The newest 20
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/credits' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/rulesOne page of the workspace's routing rules, oldest first (members and API keys)
People and API keys
Rules say where the workspace's sandboxes may run and on which providers: allow (only these) or deny (never these), for regions (codes or areas such as eu, apac) or providers. Every rule must hold and deny wins; they bind every start by any route (create, resume, carrying on, plan apply, native resume), Annex credit included. With any region rule an account is always asked for an allowed region by name, and a provider that doesn't say where it runs is left out. GET …/limits shows what they allow together.
| 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
rulesRule[]requiredidstringrul_…effect"allow" | "deny"allow: only these; deny: never these
subject"region" | "provider"valuesstring[]Region codes or areas (eu, us,
apac…), as written; or provider namesnotestringWhy, in the owner's words; "" for none
summarystringThe rule in words, such as "Only eu" or "Never boxcompute"
created_bystring | nullThe person who added it
created_atstringupdated_atstring
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/rules' \
-H 'Authorization: Bearer anx_live_…'