Docs
Sandboxes ›

Clear sandbox auto stop

DELETE/v1/sandboxes/{id}/auto-stop

Takes 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
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. await sandbox.clearAutoStop();
Answer200 OK · SandboxAutoStop
  1. {
  2. "sandboxId": string,
  3. "status": "creating" | "running" | "stopped" | "error" | "deleted" | "restoring" | …,
  4. "autoStopAt": string | null,
  5. "secondsLeft": integer | null,
  6. "ttlSeconds": integer | null,
  7. "setBy": "ttl" | "account" | "sandbox" | "null" | null,
  8. }

When it is to be stopped now: never, unless the deployment has a default of its own.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"

Headers

Authorizationrequired
Bearer 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
sandboxId
string
status
creatingrunningstoppederrordeletedrestoringmigrating
autoStopAt
stringnull
When the sandbox is to be stopped.
More Null when it is not running, or has no time limit.
secondsLeft
integernull
Seconds from now until then.
More Null with autoStopAt.
ttlSeconds
integernull
Seconds each start runs before it is stopped, unless the stop is moved.
More Null is the deployment's default.
setBy
ttlaccountsandboxnullnull
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.
409invalid_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.