Templates ›
Get template network
GET
/v1/templates/{id}/networkWhat a sandbox on the template may reach outside itself, before the addresses of its own.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const template = await agental.templates.get("tpl_0123456789abcdef");
- const network = await template.network();
Answer200 OK · TemplateNetwork
- {
- "outbound": "open" | "blocked" | "allowlist",
- "allow": string[],
- }
The template's outbound rule.
Path
idrequiredstring | e.g. "tpl_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The template's outbound rule. One that was never set is open.
TemplateNetwork2 fields
outboundopenblockedallowlist
What a sandbox on the template may reach outside itself, before its own addresses.
More
open is the internet, which is what a sandbox has when nothing is asked. blocked lets nothing out: names still resolve, and no connection leaves. allowlist lets out only what goes to an address in allow. It is enforced outside the sandbox, on the server it runs on, so nothing running in the sandbox can change it, root included. What reaches the sandbox is not affected: commands, files and its public addresses work as before. Whatever this says, no sandbox reaches another sandbox or a private network, or delivers mail on port 25.allowstring[]
The IPv4 addresses and ranges an allowlist lets out to, over any protocol and port.
More
Empty for open and blocked.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.