Docs
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
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const template = await agental.templates.get("tpl_0123456789abcdef");
  4. const variable = await template.secrets.variable("GITHUB_TOKEN");
Answer200 OK · SecretVariable

No JSON body.

The variable.

Path

idrequired
string
e.g. "tpl_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.