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
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const variable = await sandbox.secrets.variable("GITHUB_TOKEN");
Answer200 OK · SecretVariable
No JSON body.
The variable.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
namerequiredstring | e.g. "DATABASE_URL" |
Headers
AuthorizationrequiredBearer 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.