Docs
Secrets ›

Get sandbox variable

GET/v1/sandboxes/{id}/secrets/variables/{name}

One of the sandbox's variables: a plain one with its value, and one kept out of the sandbox with its hosts and its stand-in, never its value.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. const variable = await sandbox.secrets.variable("GITHUB_TOKEN");
Answer200 OK · SecretVariable

No JSON body.

The variable.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"
namerequired
string
e.g. "DATABASE_URL"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 The variable.

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.