HTTP API
Files
6 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}/sandboxes/{id}/filesOne page of what is in a directory of a running sandbox, by name
People and API keys
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
path | Inquery | Typestring | AboutAbsolute (422 otherwise) |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
filesobject[]requirednamestringpathstringtype"file" | "dir"sizeintegerBytes
modified_atstring
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/files' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/sandboxes/{id}/filesDelete a file or directory (send Content-Type application/json, as for every non-GET request)
People and API keys
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
path | Inquery | Typestring | AboutAbsolute (422 otherwise) |
recursive? | Inquery | Type"true" | AboutNeeded to delete a directory with things in it |
Answer · 204
Deleted
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/files' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/sandboxes/{id}/files/contentDownload a file, as raw bytes (or preview it, scrubbed)
People and API keys
Content-Type follows the file's extension (application/octet-stream if unknown). It always comes as an attachment, with nosniff and a Content-Security-Policy that runs nothing, as the file is untrusted. A download is the file exactly as it is, secret values included: the files are the user's own. With preview=true it is instead text/plain of a file of 256 KiB at most (413 over that), with the sandbox's secret values masked as ••••NAME, for showing on screen.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
path | Inquery | Typestring | AboutAbsolute (422 otherwise) |
preview? | Inquery | Typeboolean | Abouttrue: scrubbed text for showing on screen |
Answer · 200
The file
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/files/content' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/sandboxes/{id}/files/contentUpload a file, as raw bytes (100 MiB at most), replacing what is there
People and API keys
The only write that isn't JSON: send the bytes as the body, with any Content-Type. With an API key nothing more is needed. With a session cookie, send X-Annex-Upload: 1 or it is 403.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
path | Inquery | Typestring | AboutAbsolute (422 otherwise) |
X-Annex-Upload? | Inheader | Type"1" | AboutRequired with a session cookie |
Answer · 204
Written
curl -X PUT 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/files/content' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/checkpoints/{ckp}/filesOne page of what is in a folder of a stored checkpoint, by name, read from Annex's own copy
People and API keys
No sandbox starts and no provider is asked, so it works after the sandbox is stopped and costs nothing. Paths are absolute, as they were in the sandbox the checkpoint came from. 409 while the checkpoint is being made or when it failed; 422 for a path that is a file.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
ckp | Inpath | Typestring | AboutCheckpoint id |
path? | Inquery | Typestring | AboutAbsolute folder; left out: the checkpoint's root |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
filesCheckpointFile[]requirednamestringpathstringAbsolute
type"file" | "dir" | "symlink"sizeintegerBytes
modeintegerPermission bits, such as 420 (0644)
modified_atstringtargetstring | nullA symlink's target
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/checkpoints/ckp/files' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/checkpoints/{ckp}/files/contentDownload one file of a stored checkpoint, as it was saved, read from Annex's own copy
People and API keys
Streamed out of Annex's store a piece at a time, each piece checked against the hash it was saved with; no sandbox starts. Sent as an attachment that browsers won't run, like a sandbox's files. Content-Length is the size it was saved with, so a download cut short by a storage error reads as cut short. 422 for a folder or a link.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
ckp | Inpath | Typestring | AboutCheckpoint id |
path | Inquery | Typestring | AboutAbsolute (422 otherwise) |
Answer · 200
The file's bytes
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/checkpoints/ckp/files/content' \
-H 'Authorization: Bearer anx_live_…'