Choose how a sandbox's outbound traffic leaves
`via: project` follows the project: its default proxy, else its static address at the sandbox's site, else Pod's own addresses.
Not available yet The API does not serve reading or choosing how a sandbox's outbound traffic leaves yet.
via: project follows the project: its default proxy, else its static address at the sandbox's site, else Pod's own addresses. via: proxy names one of the project's proxies. via: home leases an address on a home connection that Pod resells from a provider, sticky for session_minutes or new per connection; max_leases counts the organization's. A replaced lease is given back. The way out follows the sandbox across sleep, wake and moves. proxy needs the own_proxy entitlement and home the leased_home_addresses one; both are refused with conflict on patient_data while that setting is on. project is always allowed, so a sandbox can be taken off a home route whatever the account's standing.
A key with the network:write scope.
Request
curl -X PUT "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/exit" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"via":"project"}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
sandbox_id | path | string | Yes | |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
via | "project" | "proxy" | "home" | Yes | What the sandbox asked for. |
proxy_id | string | No | For via: proxy, one of the project's proxies; not otherwise. |
home | HomeLeaseRequest | No | For via: home; not otherwise. |
Answer
200. The sandbox's way out as it is now.
{
"sandbox_id": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
"via": "project",
"proxy_id": null,
"home": null,
"route": "pod",
"static_address_id": null,
"carrying": false,
"version": 0,
"updated_at": null
}| Field | Type | Always | What it is |
|---|---|---|---|
sandbox_id | string | Yes | |
via | "project" | "proxy" | "home" | Yes | What the sandbox asked for. |
proxy_id | string | null | Yes | The proxy the traffic leaves through, named or the project's default; null otherwise. |
home | HomeLease | null | Yes | The leased address, for via: home. |
route | "pod" | "static_address" | "proxy" | "home" | Yes | Where the sandbox's traffic leaves now. Treat a value you do not know as not Pod's own addresses. |
static_address_id | string | null | Yes | The project's static address the traffic leaves from, for route: static_address. |
carrying | boolean | Yes | False while the route may not carry; the sandbox's traffic is then refused, never sent from Pod's own addresses. |
version | integer | Yes | Raised by every change, a lease's renewal included. At least 0. |
updated_at | string | null | Yes |
Errors
The refusals this call is known for: invalid, forbidden, not_found, plan_required, account_restricted, conflict, quota_exceeded. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.network.setExit(sandboxId, { via }) |
| Python | pod.network.set_exit(sandbox_id, {…}) |