Outbound rules ›
Get network
GET
/v1/sandboxes/{id}/networkWhat the sandbox may reach outside itself: the rule it is held to, as network on the sandbox says it, and what it comes from: its template's rule as the sandbox has it, and its own addresses on top. It changes nothing, and is answered whatever state the sandbox is in.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const network = await sandbox.network();
Answer200 OK · SandboxNetworkDetail
- {
- "outbound": "open" | "blocked" | "allowlist",
- "allow": string[],
- "template": {
- "templateId": string,
- "name": string,
- "outbound": "open" | "blocked" | "allowlist",
- "allow": string[],
- },
- "own": {
- "allow": string[],
- },
- }
The rule the sandbox is held to, and what it comes from.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 The rule the sandbox is held to, and what it comes from.
SandboxNetworkDetail4 fields
outboundopenblockedallowlist
The rule the sandbox is held to now, as network on the sandbox says it: its template's rule as its copy has it, with its own addresses on top.
allowstring[]
The addresses an allowlist lets out to: its template's, then its own.
More
Empty for open and blocked.templateobject4 fields
Its template's rule as the sandbox has it: as it was when the sandbox last started, was put on the template, or was named by POST /v1/templates/{id}/apply.
More
GET /v1/sandboxes/{id}/template says whether that is the template as it is now.templateIdstring
namestring
outboundopenblockedallowlist
allowstring[]
ownobject1 field
The addresses it may reach on top of its template's rule.
More
They add to an allowlist, make a blocked template's rule an allowlist of them, and change nothing while the template is open.allowstring[]
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.