Replace a sandbox's network rules: internet on or off, allowed and denied destinations, host:port pairs.
Takes effect on open connections too: a connection the new rules refuse is cut. Private addresses are always refused. A paid sandbox of an organization with a paid purchase reaches every port, narrowed by allow and deny; a sandbox without credit reaches ports 80 and 443. Some ports (telnet, SMB, IRC, and mail unless enabled by support) are never reachable.
Request
- Base URL: https://api.withruntime.com
- URL: https://api.withruntime.com/v1/sandboxes/{id}/network
- Auth: HTTP bearer
Path parameters
Resource identifier (UUID).
Headers
Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.
Request body
Example request
{
"allow": [
"registry.npmjs.org"
],
"deny": [
"registry.npmjs.org"
],
"connect": [
"db.example.com:5432"
]
}Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.