Sandboxes ›
Clear sandbox auto stop
DELETE
/v1/sandboxes/{id}/auto-stopTakes its time limit away: it runs until it is stopped, this run and every start after. Its ttlSeconds is set to null, the deployment's default, and a stop that was moved for the run under way is gone. Running or stopped alike. A key needs sandbox.update for it, and a sandbox's own token cannot: an agent in it moves its stop, and its owner decides whether it has one.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- await sandbox.clearAutoStop();
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 now: never, unless the deployment has a default of its own.
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 now: never, unless the deployment has a default of its own.
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. |
| 409 | invalid_state it reached its stop and is being stopped now. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.