Snapshots
4 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
The org's snapshots, newest first#
GET
Parameters/v1/snapshotsscope sandboxes:readsandbox_idquery · stringOnly those taken from this sandbox
200401403
curl -s -X GET https://api.kosa8.com/v1/snapshots \ -H "Authorization: Bearer $KOSA8_API_KEY"
Get a snapshot#
GET
Parameters/v1/snapshots/{id}scope sandboxes:readidrequiredpath · stringSnapshot id (snap_…)
200401403404
curl -s -X GET https://api.kosa8.com/v1/snapshots/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Delete a snapshot: its bytes leave its host and its storage stops being billed; sandboxes made from it are not touched#
DELETE
Parameters/v1/snapshots/{id}scope sandboxes:writeidrequiredpath · stringSnapshot id (snap_…)
200401403404502
curl -s -X DELETE https://api.kosa8.com/v1/snapshots/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Save the sandbox as a snapshot of the org's: memory, processes and disk, kept until deleted, whatever happens to the sandbox#
POST
/v1/sandboxes/{id}/snapshotsscope sandboxes:writeThe sandbox keeps running (a sleeping one is woken). Make sandboxes from it with POST /v1/sandboxes {"snapshot": id}; it outlives the sandbox it came from (unlike a checkpoint, which goes with its sandbox). Kept on the source's host, and sandboxes made from it run there. Its bytes are billed as storage until it is deleted (https://kosa8.com/pricing/). At most 50 per org (429 snapshot_limit). Not for dedicated-cores sandboxes or ones with secrets (409).
Parametersidrequiredpath · stringSandbox id (sbx_…)
namestring—
201400401402403404409429501502
curl -s -X POST https://api.kosa8.com/v1/sandboxes/$SBX/snapshots \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json