Set the team's internet rules (owners only)
const url = 'https://api.global.stillbox.example/v1/teams/example/internet';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"open","allowed_hosts":["github.com","registry.npmjs.org","pypi.org"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.global.stillbox.example/v1/teams/example/internet \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mode": "open", "allowed_hosts": [ "github.com", "registry.npmjs.org", "pypi.org" ] }'A ceiling for the team’s sandboxes (ADR 0040): with an allowlist, they reach only hosts both the team and the sandbox allow. Applies to running sandboxes within seconds.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Where the sandbox may connect. open is the internet (private networks are always blocked). allowlist is
only the web (ports 80 and 443) on allowed_hosts and their subdomains; DNS keeps working.
object
Responses
Section titled “Responses”The team
object
object
object
notify: tell the owners. sleep: also put the team’s sandboxes to sleep until next month.
This month’s compute and model calls of the team’s sandboxes, as of checked_at.
warning from 80%; exceeded from 100%, when sleep also keeps the sandboxes asleep.
object
The owner who stopped it.
Example
{ "internet": { "mode": "open" }, "budget": { "action": "notify", "state": "ok" }}The request is invalid
object
Example
{ "code": "not_found"}The API key is missing or invalid
object
Example
{ "code": "not_found"}Only an owner can do this (owner_only), or the invitation is for another address (not_invited)
object
Example
{ "code": "not_found"}No such sandbox in your organization (or no such file)
object
Example
{ "code": "not_found"}