@insforge/instabox-sdk, version 0.7.0. A Sandbox is one
machine: its methods are on the Sandbox, Commands,
Files, Desktop and
Metrics and usage pages. The
common calls, step by step, are in the SDK quickstart.
Install and authenticate
create, connect, list, kill, the snapshot calls and the metrics and usage
calls) also takes the key and URL as options, which win over the environment. A Sandbox object keeps
its connection, so its own methods take no key.
InstaboxAuthError with code missing_api_key (status 0)
before any request. The key is sent as the X-API-Key header.
ConnectionOptions
These apply to every static call.Scopes
The API key scopes each call needs.:write and :delete include :read. Creating from a snapshot name also needs images:read. A call
outside the key’s scopes throws InstaboxAuthError (403 missing_scope).
Errors
status is 0 for errors that did not come from an HTTP response. A failed operation (for example
no_capacity while creating) throws InstaboxError with the operation’s code and operationId.
Reads, and changes (which carry an
Idempotency-Key), are retried up to 3 times with backoff on 502, 503,
504 and network errors. Every server code: Errors.