Templates ›
Get template variable
GET
/v1/templates/{id}/secrets/variables/{name}One of the template'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 template = await agental.templates.get("tpl_0123456789abcdef");
- const variable = await template.secrets.variable("GITHUB_TOKEN");
Answer200 OK · SecretVariable
No JSON body.
The variable.
Path
idrequiredstring | e.g. "tpl_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.