Templates ›
Get sandbox template
GET
/v1/sandboxes/{id}/templateWhich template the sandbox is on, whether it is up to date with it, and the names of what it has from it.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const template = await sandbox.template();
Answer200 OK · SandboxTemplate
- {
- "sandboxId": string,
- "templateId": string,
- "name": string,
- "default": boolean,
- "upToDate": boolean,
- "takenAt": string,
- "variables": string[],
- "hidden": string[],
- "files": string[],
- }
The sandbox's template.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The sandbox's template.
SandboxTemplate9 fields
sandboxIdstring
templateIdstring
namestring
The template's name.
defaultboolean
upToDateboolean
Whether it has the template's variables, files and outbound rule as they are now.
More
A sandbox takes them when it starts, when it is put on the template, and when POST /v1/templates/{id}/apply names it. A stopped one that is not up to date takes them at its next start.takenAtstring
When it last took them.
variablesstring[]
The names of the variables it has from the template: its own come on top of these.
hiddenstring[]
Of those, the ones kept out of the sandbox, as it has them.
filesstring[]
The paths of the files it has from the template: its own come on top of these.
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.