Sandboxes ›
Get sandbox auto stop
GET
/v1/sandboxes/{id}/auto-stopWhen a running sandbox is to be stopped, how long that is from now, and what decided it.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const stop = await sandbox.autoStop();
Answer200 OK · SandboxAutoStop
- {
- "sandboxId": string,
- "status": "creating" | "running" | "stopped" | "error" | "deleted" | "restoring" | …,
- "autoStopAt": string | null,
- "secondsLeft": integer | null,
- "ttlSeconds": integer | null,
- "setBy": "ttl" | "account" | "sandbox" | "null" | null,
- }
When it is to be stopped.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 When it is to be stopped.
SandboxAutoStop6 fields
sandboxIdstring
statuscreatingrunningstoppederrordeletedrestoringmigrating
autoStopAtstringnull
When the sandbox is to be stopped.
More
Null when it is not running, or has no time limit.secondsLeftintegernull
Seconds from now until then.
More
Null with autoStopAt.ttlSecondsintegernull
Seconds each start runs before it is stopped, unless the stop is moved.
More
Null is the deployment's default.setByttlaccountsandboxnullnull
What decided autoStopAt.
More
ttl: its last start and ttlSeconds. account: a PUT of this with one of its account's API keys, or the console. sandbox: a PUT of this by the sandbox itself. Null with autoStopAt.Errors and other answers
| 404 | Not found. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.