Templates ›
List template variables
GET
/v1/templates/{id}/secrets/variablesThe names of the template'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
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const template = await agental.templates.get("tpl_0123456789abcdef");
- const names = await template.secrets.variables();
Answer200 OK · SecretVariableNames
- {
- "names": string[],
- "hidden": string[],
- }
Variable names.
Path
idrequiredstring | e.g. "tpl_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 Variable names.
SecretVariableNames2 fields
namesstring[]
hiddenstring[]
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.