Docs
Outbound rules ›

Get network

GET/v1/sandboxes/{id}/network

What 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
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. const network = await sandbox.network();
Answer200 OK · SandboxNetworkDetail
  1. {
  2. "outbound": "open" | "blocked" | "allowlist",
  3. "allow": string[],
  4. "template": {
  5. "templateId": string,
  6. "name": string,
  7. "outbound": "open" | "blocked" | "allowlist",
  8. "allow": string[],
  9. },
  10. "own": {
  11. "allow": string[],
  12. },
  13. }

The rule the sandbox is held to, and what it comes from.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"

Headers

Authorizationrequired
Bearer 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
outbound
openblockedallowlist
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.
allow
string[]
The addresses an allowlist lets out to: its template's, then its own.
More Empty for open and blocked.
template
object4 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.
templateId
string
name
string
outbound
openblockedallowlist
allow
string[]
own
object1 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.
allow
string[]

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.