Skip to content

Get an environment at its current version

GET
/environments/{environment_id}
curl --request GET \
--url https://api.global.stillbox.example/v1/environments/example \
--header 'Authorization: Bearer <token>'
environment_id
required
string

The environment and its secrets’ names (never their values)

Media typeapplication/json
object
id
required
string
name
required
string
version
required

The current version, which new sandboxes get.

integer
spec
required
object
repositories
Array<object>
<= 10 items
object
url
required

An https address, such as https://github.com/acme/api.

string
branch
string
path

The folder in the home folder; the repository’s name by default.

string
credential

The name of one of the environment’s secrets, for a private repository.

string
variables

Non-secret variables, NAME to value (up to 100).

object
key
additional properties
string
setup_script

A shell script run once in each new sandbox, after the repositories are cloned.

string
<= 65536 characters
mcp_servers
Array<object>
<= 20 items

A remote server (url, with headers) or a local one (command, with args and env). Values may use ${SECRET_NAME}.

object
name
required
string
url
string
headers
object
key
additional properties
string
command
string
args
Array<string>
env
object
key
additional properties
string
house_rules

Instructions for the agents, in Markdown.

string
<= 65536 characters
secrets
required
Array<object>
object
name
required
string
mode
required
string
Allowed values: placeholder inside
hosts
required

Where the credential broker may swap the placeholder for the value.

Array<string>
hint
required

The value’s last characters, to recognize it.

string
updated_at
required
string format: date-time
created_by
string
created_at
required
string format: date-time
updated_at
required
string format: date-time

Example

{
"secrets": [
{
"mode": "placeholder"
}
]
}

The API key is missing or invalid

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"
}