Skip to content

Set the team's internet rules (owners only)

PUT
/teams/{team_id}/internet
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.

team_id
required
string
Media typeapplication/json

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
mode
required
string
Allowed values: open allowlist
allowed_hosts
Array<string>
<= 100 items

The team

Media typeapplication/json
object
id
required
string
name
required
string
member_ids
required
Array<string>
internet
required
object
mode
required
string
Allowed values: open allowlist
allowed_hosts
required
Array<string>
budget
object
monthly_usd
required
number format: double
action
required

notify: tell the owners. sleep: also put the team’s sandboxes to sleep until next month.

string
Allowed values: notify sleep
spent_usd
required

This month’s compute and model calls of the team’s sandboxes, as of checked_at.

number format: double
state
required

warning from 80%; exceeded from 100%, when sleep also keeps the sandboxes asleep.

string
Allowed values: ok warning exceeded
checked_at
string format: date-time
stopped
object
at
required
string format: date-time
by

The owner who stopped it.

string
reason
required
string
created_at
required
string format: date-time

Example

{
"internet": {
"mode": "open"
},
"budget": {
"action": "notify",
"state": "ok"
}
}

The request is invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

Only an owner can do this (owner_only), or the invitation is for another address (not_invited)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No such sandbox in your organization (or no such file)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}