Docs
Secrets ›

List sandbox variables

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

The names of the sandbox's variables, and which of them are kept out of the sandbox. Values are read one at a time, and a kept-out one's never.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. const names = await sandbox.secrets.variables();
Answer200 OK · SecretVariableNames
  1. {
  2. "names": string[],
  3. "hidden": string[],
  4. }

Variable names.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"

Headers

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

Returns

200 Variable names.

SecretVariableNames2 fields
names
string[]
hidden
string[]
Of those, the ones kept out of the sandbox.

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.