Core concepts
Environments
Initialize repositories and manage persistent workspace lifecycle.
On this page
Create a workspace
An Environment owns a persistent writable RootFS and a /workspace directory. Sessions share its files, tools, instructions and configuration. Use one Environment for work that should share state; use forks for independent workspaces.
Create a managed Environment
/v1/environmentsOptional networkPolicy is stored before Sandbox provisioning and repository initialization. If omitted, outbound access defaults to allow-all with no domain exceptions. Allow required repository and dependency hosts when initializing a restricted Environment; model connection URLs never automatically grant outbound access.
Authentication: Platform API bearer token
Request example
curl -X POST \
"https://api.sandpi.ai/v1/environments" \
-H "Authorization: Bearer $SANDPI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "PR review workspace",
"labels": {
"repo": "sandpi",
"purpose": "review"
}
}'Request body · required application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
name | string · min length 1; max length 100Validation pattern.*\S.* | Yes | Human-readable name for this resource. |
repository | object | No | Public HTTPS Git repository used to initialize the workspace. |
repository.url | string · format: uri; max length 2048Validation pattern^https:\/\/.* | Yeswithin repository | Public HTTPS Git URL without credentials, a port, query, fragment, or private host. |
repository.ref | stringValidation pattern^(?!.*\.\.)[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$ | Nowithin repository | Optional repository branch or tag to clone during initialization. |
projectId | string · min length 1 | No | Optional Project scope; must match the API token Project. |
labels | object · max 32 keys | No | User-defined labels for exact-match filtering. Up to 32 entries. Keys are 1–64 ASCII letters, digits, dots, underscores, slashes or hyphens, beginning with a letter or digit; constructor and prototype are reserved. Values are case-sensitive strings of up to 256 characters, including empty strings. |
labels.{key} | string · max length 256 | Noadditional keys | — |
networkPolicy | object · extra fields rejected | No | Environment-wide outbound policy, enforced by Sandbox0. Domain exceptions allow destinations in block-all mode and deny destinations in allow-all mode. Enabled egress credentials also allow their destinations in block-all mode. This policy does not restrict HTTP methods, paths, or local commands. |
networkPolicy.mode | string · values: "allow-all" | "block-all" | Yeswithin networkPolicy | Default for outbound traffic not matched by a domain exception or enabled credential destination. |
networkPolicy.domainExceptions | array · max 500 items | Yeswithin networkPolicy | Domains allowed in block-all mode or denied in allow-all mode. Exact names do not automatically include subdomains. |
networkPolicy.domainExceptions[] | string · min length 1; max length 255 | Yeseach array item | Exact domain or wildcard suffix such as *.example.com. URLs, paths, ports and IP literals are not supported. Names are normalized to lowercase and deduplicated. |
Example
{
"name": "PR review workspace",
"labels": {
"repo": "sandpi",
"purpose": "review"
}
}Responses
201 Created.Response body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | object | Yes | Run completion settles the file diff and RootFS checkpoint, then immediately requests a memory pause when no Run, rollback, or checkpoint remains. File and other runtime access uses a one-minute inactivity fallback. Queued Runs continue without an intervening pause. The interactive TUI retains its separate fifteen-minute idle policy. On access after a confirmed memory restoration failure, Sandpi automatically requests a durable cold restart from committed files for a qualified stopped source. Processes restart and memory or uncommitted writes may be lost. Pending or uncertain restores retain their original operation. |
data.id | string | Yeswithin data | Resource identifier used to read or manage this resource. |
data.name | string | Yeswithin data | Human-readable name for this resource. |
data.status | string · values: "ready" | "updating" | "error" | Yeswithin data | Current resource state; inspect the allowed values and the operation’s lifecycle notes. |
data.platform | object · extra fields rejected | Yeswithin data | Platform checkpoint, workspace revision and initialization metadata. |
data.platform.initialCheckpointStatus | string · values: "pending" | "ready" | "failed" | Yeswithin data | Initialization checkpoint state. Wait for ready before submitting work. |
data.platform.initialCheckpointSnapshotId | string | Nowithin data | Initial immutable RootFS checkpoint identifier, present after capture succeeds. |
data.platform.initialCheckpointError | string | Nowithin data | Diagnostic text for initialization checkpoint failure. |
data.platform.workspaceRevision | integer · ≥ -9007199254740991; ≤ 9007199254740991 | Yeswithin data | Observed workspace revision used to fence conflicting changes and fork operations. |
data.platform.forkedFrom | object · extra fields rejected | Nowithin data | Source Environment and selected fork boundary; present for forked workspaces. |
data.platform.forkedFrom.environmentId | string | Yeswithin data | Environment identifier. It must belong to the caller’s account or Project. |
data.platform.forkedFrom.mode | string · values: "current" | "checkpoint" | Yeswithin data | Whether the fork copied current workspace files or a selected immutable checkpoint. |
data.platform.forkedFrom.snapshotId | string | Nowithin data | Sandbox0 checkpoint identifier. Use a returned initial or Run checkpoint when pinning a fork. |
data.platform.forkedFrom.revision | integer · ≥ -9007199254740991; ≤ 9007199254740991 | Yeswithin data | Source Environment Run revision observed when the fork was created. |
data.platform.repository | object · extra fields rejected | Nowithin data | Public HTTPS Git repository used to initialize the workspace. |
data.platform.repository.url | string · format: uri | Yeswithin data | Public HTTPS Git URL used to initialize the workspace. |
data.platform.repository.ref | string | Nowithin data | Optional repository branch or tag to clone during initialization. |
data.platform.repository.initialized | boolean | Yeswithin data | Whether repository initialization has finished. |
data.labels | object · max 32 keys | Yeswithin data | User-defined labels for exact-match filtering. Up to 32 entries. Keys are 1–64 ASCII letters, digits, dots, underscores, slashes or hyphens, beginning with a letter or digit; constructor and prototype are reserved. Values are case-sensitive strings of up to 256 characters, including empty strings. |
data.labels.{key} | string · max length 256 | Noadditional keys | — |
data.labelsRevision | integer · ≥ 0; ≤ 2147483647 | Yeswithin data | Independent labels revision. Supply the last read revision when replacing labels; a stale revision returns 409. |
data.networkPolicy | object · extra fields rejected | Yeswithin data | Environment-wide outbound policy, enforced by Sandbox0. Domain exceptions allow destinations in block-all mode and deny destinations in allow-all mode. Enabled egress credentials also allow their destinations in block-all mode. This policy does not restrict HTTP methods, paths, or local commands. |
data.networkPolicy.mode | string · values: "allow-all" | "block-all" | Yeswithin data | Default for outbound traffic not matched by a domain exception or enabled credential destination. |
data.networkPolicy.domainExceptions | array · max 500 items | Yeswithin data | Domains allowed in block-all mode or denied in allow-all mode. Exact names do not automatically include subdomains. |
data.networkPolicy.domainExceptions[] | string · min length 1; max length 255 | Yeseach array item | Exact domain or wildcard suffix such as *.example.com. URLs, paths, ports and IP literals are not supported. Names are normalized to lowercase and deduplicated. |
data.{key} | any | Noadditional keys | — |
Example
{
"data": {
"id": "",
"name": "",
"status": "ready",
"platform": {
"initialCheckpointStatus": "pending",
"workspaceRevision": -9007199254740991
},
"labels": {},
"labelsRevision": 0,
"networkPolicy": {
"mode": "allow-all",
"domainExceptions": [
"example"
]
}
}
}Error responses
400 Invalid request.application/json
401 Missing or invalid Platform API token.application/json
402 Insufficient Platform credit.application/json
403 Token cannot create in the requested Project.application/json
415 Unsupported request media type.application/json
503 Platform execution is unavailable.application/json
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}An optional public HTTPS Git repository is cloned into /workspace/project before the initial checkpoint. Repository credentials and private hosts are not accepted during initialization. Set networkPolicy at creation to restrict access before initialization. Allow required repository hosts, then manage outbound network access and egress credentials separately.
Wait for initialization
Save the returned Environment ID and poll its state. Wait for both the Environment status and platform.initialCheckpointStatus to be ready before submitting work.
Get a managed Environment
/v1/environments/{environmentId}Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string · min length 1 | Yes | Environment identifier. It must belong to the caller’s account or Project. |
Request example
curl \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID" \
-H "Authorization: Bearer $SANDPI_API_TOKEN"No request body.
Responses
200 Successful response.Response body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | object | Yes | Run completion settles the file diff and RootFS checkpoint, then immediately requests a memory pause when no Run, rollback, or checkpoint remains. File and other runtime access uses a one-minute inactivity fallback. Queued Runs continue without an intervening pause. The interactive TUI retains its separate fifteen-minute idle policy. On access after a confirmed memory restoration failure, Sandpi automatically requests a durable cold restart from committed files for a qualified stopped source. Processes restart and memory or uncommitted writes may be lost. Pending or uncertain restores retain their original operation. |
data.id | string | Yeswithin data | Resource identifier used to read or manage this resource. |
data.name | string | Yeswithin data | Human-readable name for this resource. |
data.status | string · values: "ready" | "updating" | "error" | Yeswithin data | Current resource state; inspect the allowed values and the operation’s lifecycle notes. |
data.platform | object · extra fields rejected | Yeswithin data | Platform checkpoint, workspace revision and initialization metadata. |
data.platform.initialCheckpointStatus | string · values: "pending" | "ready" | "failed" | Yeswithin data | Initialization checkpoint state. Wait for ready before submitting work. |
data.platform.initialCheckpointSnapshotId | string | Nowithin data | Initial immutable RootFS checkpoint identifier, present after capture succeeds. |
data.platform.initialCheckpointError | string | Nowithin data | Diagnostic text for initialization checkpoint failure. |
data.platform.workspaceRevision | integer · ≥ -9007199254740991; ≤ 9007199254740991 | Yeswithin data | Observed workspace revision used to fence conflicting changes and fork operations. |
data.platform.forkedFrom | object · extra fields rejected | Nowithin data | Source Environment and selected fork boundary; present for forked workspaces. |
data.platform.forkedFrom.environmentId | string | Yeswithin data | Environment identifier. It must belong to the caller’s account or Project. |
data.platform.forkedFrom.mode | string · values: "current" | "checkpoint" | Yeswithin data | Whether the fork copied current workspace files or a selected immutable checkpoint. |
data.platform.forkedFrom.snapshotId | string | Nowithin data | Sandbox0 checkpoint identifier. Use a returned initial or Run checkpoint when pinning a fork. |
data.platform.forkedFrom.revision | integer · ≥ -9007199254740991; ≤ 9007199254740991 | Yeswithin data | Source Environment Run revision observed when the fork was created. |
data.platform.repository | object · extra fields rejected | Nowithin data | Public HTTPS Git repository used to initialize the workspace. |
data.platform.repository.url | string · format: uri | Yeswithin data | Public HTTPS Git URL used to initialize the workspace. |
data.platform.repository.ref | string | Nowithin data | Optional repository branch or tag to clone during initialization. |
data.platform.repository.initialized | boolean | Yeswithin data | Whether repository initialization has finished. |
data.labels | object · max 32 keys | Yeswithin data | User-defined labels for exact-match filtering. Up to 32 entries. Keys are 1–64 ASCII letters, digits, dots, underscores, slashes or hyphens, beginning with a letter or digit; constructor and prototype are reserved. Values are case-sensitive strings of up to 256 characters, including empty strings. |
data.labels.{key} | string · max length 256 | Noadditional keys | — |
data.labelsRevision | integer · ≥ 0; ≤ 2147483647 | Yeswithin data | Independent labels revision. Supply the last read revision when replacing labels; a stale revision returns 409. |
data.networkPolicy | object · extra fields rejected | Yeswithin data | Environment-wide outbound policy, enforced by Sandbox0. Domain exceptions allow destinations in block-all mode and deny destinations in allow-all mode. Enabled egress credentials also allow their destinations in block-all mode. This policy does not restrict HTTP methods, paths, or local commands. |
data.networkPolicy.mode | string · values: "allow-all" | "block-all" | Yeswithin data | Default for outbound traffic not matched by a domain exception or enabled credential destination. |
data.networkPolicy.domainExceptions | array · max 500 items | Yeswithin data | Domains allowed in block-all mode or denied in allow-all mode. Exact names do not automatically include subdomains. |
data.networkPolicy.domainExceptions[] | string · min length 1; max length 255 | Yeseach array item | Exact domain or wildcard suffix such as *.example.com. URLs, paths, ports and IP literals are not supported. Names are normalized to lowercase and deduplicated. |
data.{key} | any | Noadditional keys | — |
Example
{
"data": {
"id": "",
"name": "",
"status": "ready",
"platform": {
"initialCheckpointStatus": "pending",
"workspaceRevision": -9007199254740991
},
"labels": {},
"labelsRevision": 0,
"networkPolicy": {
"mode": "allow-all",
"domainExceptions": [
"example"
]
}
}
}Error responses
400 Invalid request.application/json
401 Missing or invalid Platform API token.application/json
404 Resource not found or outside token scope.application/json
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}Do not treat an accepted creation response as proof that the repository and checkpoint are ready. If initialization fails, inspect its diagnostic state before creating a replacement.
Pause and resume
After execution and checkpoint work settle, a Platform Sandbox pauses immediately with a memory checkpoint. Queued Runs continue without pausing between them. A Run, rollback or file operation resumes it when needed. Runtime access has a one-minute inactivity fallback; the interactive TUI has its own fifteen-minute idle policy.
If memory restoration definitively fails, Sandpi automatically requests a durable cold restart from committed RootFS files when the stopped source qualifies for recovery. Processes and PTYs restart; retained memory and uncommitted writes can be lost. A queued Run waits for this recovery instead of being rejected solely because cold recovery is pending. An already executing Run is never silently replayed when its original process is lost. Timeouts, capacity waits, and uncertain replies continue reconciling the original memory operation. Recovery still requires quota, writable storage and credential qualification.
Pause preserves workspace files and native Session state. Closing your browser or SSE stream does not stop a Run. The Environment lifecycle lock prevents pause from racing execution or file operations. Failed checkpoints and pauses remain durable for retry.
Configure shared capabilities
Use the console’s Environment Configuration tab or the corresponding APIs for agents.md, Skills, MCP servers, credentials, schedules and webhooks.
Organize with labels
Labels are user-defined key/value pairs for grouping workspaces by repository, stage, purpose or an external task ID. Set them when creating an Environment, then edit them in the console’s Configuration tab or replace the entire map through the API below. Read the Environment first and supply its labels revision; a concurrent edit returns a conflict instead of overwriting another user’s labels. Remove all entries to clear the map.
Replace Environment labels
/v1/environments/{environmentId}/labelsReplace the entire label map; {} clears it. Labels are product metadata outside RootFS checkpoints, do not resume a paused Sandbox, and may be changed during a Run. Read labelsRevision from the Environment first. Concurrent stale updates return 409. Forks copy the source labels once at target creation; later edits and RootFS rollback do not propagate labels.
Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string · min length 1 | Yes | Environment identifier. It must belong to the caller’s account or Project. |
Request example
curl -X PUT \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/labels" \
-H "Authorization: Bearer $SANDPI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"labels": {
"repo": "sandpi",
"stage": "dev"
},
"labelsRevision": 0
}'Request body · required application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
labels | object · max 32 keys | Yes | User-defined labels for exact-match filtering. Up to 32 entries. Keys are 1–64 ASCII letters, digits, dots, underscores, slashes or hyphens, beginning with a letter or digit; constructor and prototype are reserved. Values are case-sensitive strings of up to 256 characters, including empty strings. |
labels.{key} | string · max length 256 | Noadditional keys | — |
labelsRevision | integer · ≥ 0; ≤ 2147483647 | Yes | Independent labels revision. Supply the last read revision when replacing labels; a stale revision returns 409. |
Example
{
"labels": {
"repo": "sandpi",
"stage": "dev"
},
"labelsRevision": 0
}Responses
200 Environment labels and their current revision.Response body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | object · extra fields rejected | Yes | — |
data.labels | object · max 32 keys | Yeswithin data | User-defined labels for exact-match filtering. Up to 32 entries. Keys are 1–64 ASCII letters, digits, dots, underscores, slashes or hyphens, beginning with a letter or digit; constructor and prototype are reserved. Values are case-sensitive strings of up to 256 characters, including empty strings. |
data.labels.{key} | string · max length 256 | Noadditional keys | — |
data.labelsRevision | integer · ≥ 0; ≤ 2147483647 | Yeswithin data | Independent labels revision. Supply the last read revision when replacing labels; a stale revision returns 409. |
Example
{
"data": {
"labels": {},
"labelsRevision": 0
}
}Error responses
400 Invalid request.application/json
401 Missing or invalid Platform API token.application/json
404 Resource not found or outside token scope.application/json
409 Labels were edited since the supplied revision, or Environment deletion is pending. Read the Environment again before retrying.application/json
415 Unsupported request media type.application/json
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}Label edits do not wake a paused Sandbox and can happen during a Run. Labels live outside RootFS checkpoints, so rollback retains their current values. A fork copies its source’s labels once when the child’s metadata is created; subsequent edits are independent. Labels do not grant access or change Project scope.
Remove an Environment
Deletion cleans online workspace content asynchronously and fences new operations. Save the deletion receipt and follow it to completion. Completed forks remain independent. See retention and deletion.
List your Environments
Use the token’s account or Project scope to list workspaces before selecting one.
List managed Environments
/v1/environmentsAuthentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
query: q | string · max length 200 | No | Case-insensitive literal substring of the Environment name, ID or initialization repository URL. |
query: status | string · values: "ready" | "updating" | "error" | No | Environment provisioning status; separate from the Sandbox running/paused state. |
query: label | array · max 32 items | No | Repeat label=key=value for case-sensitive exact matching. Every condition must match. Split each condition at its first equals sign. Conflicting values for one key are invalid. |
query: limit | integer · ≥ 1; ≤ 100 | No | Opt into pagination with a page size of 1–100. Omit to preserve the complete-list behavior. A paginated response may include nextCursor. |
query: before | string · min length 1; max length 200 | No | nextCursor from the prior page. Requires limit and the same search/filter conditions. |
Request example
curl \
"https://api.sandpi.ai/v1/environments" \
-H "Authorization: Bearer $SANDPI_API_TOKEN"No request body.
Responses
200 Successful response.Response body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | array | Yes | Successful result wrapped by the API. The child fields describe its content. |
data[] | object | Yeseach array item | Run completion settles the file diff and RootFS checkpoint, then immediately requests a memory pause when no Run, rollback, or checkpoint remains. File and other runtime access uses a one-minute inactivity fallback. Queued Runs continue without an intervening pause. The interactive TUI retains its separate fifteen-minute idle policy. On access after a confirmed memory restoration failure, Sandpi automatically requests a durable cold restart from committed files for a qualified stopped source. Processes restart and memory or uncommitted writes may be lost. Pending or uncertain restores retain their original operation. |
data[].id | string | Yeseach array item | Resource identifier used to read or manage this resource. |
data[].name | string | Yeseach array item | Human-readable name for this resource. |
data[].status | string · values: "ready" | "updating" | "error" | Yeseach array item | Current resource state; inspect the allowed values and the operation’s lifecycle notes. |
data[].platform | object · extra fields rejected | Yeseach array item | Platform checkpoint, workspace revision and initialization metadata. |
data[].platform.initialCheckpointStatus | string · values: "pending" | "ready" | "failed" | Yeseach array item | Initialization checkpoint state. Wait for ready before submitting work. |
data[].platform.initialCheckpointSnapshotId | string | Noeach array item | Initial immutable RootFS checkpoint identifier, present after capture succeeds. |
data[].platform.initialCheckpointError | string | Noeach array item | Diagnostic text for initialization checkpoint failure. |
data[].platform.workspaceRevision | integer · ≥ -9007199254740991; ≤ 9007199254740991 | Yeseach array item | Observed workspace revision used to fence conflicting changes and fork operations. |
data[].platform.forkedFrom | object · extra fields rejected | Noeach array item | Source Environment and selected fork boundary; present for forked workspaces. |
data[].platform.forkedFrom.environmentId | string | Yeseach array item | Environment identifier. It must belong to the caller’s account or Project. |
data[].platform.forkedFrom.mode | string · values: "current" | "checkpoint" | Yeseach array item | Whether the fork copied current workspace files or a selected immutable checkpoint. |
data[].platform.forkedFrom.snapshotId | string | Noeach array item | Sandbox0 checkpoint identifier. Use a returned initial or Run checkpoint when pinning a fork. |
data[].platform.forkedFrom.revision | integer · ≥ -9007199254740991; ≤ 9007199254740991 | Yeseach array item | Source Environment Run revision observed when the fork was created. |
data[].platform.repository | object · extra fields rejected | Noeach array item | Public HTTPS Git repository used to initialize the workspace. |
data[].platform.repository.url | string · format: uri | Yeseach array item | Public HTTPS Git URL used to initialize the workspace. |
data[].platform.repository.ref | string | Noeach array item | Optional repository branch or tag to clone during initialization. |
data[].platform.repository.initialized | boolean | Yeseach array item | Whether repository initialization has finished. |
data[].labels | object · max 32 keys | Yeseach array item | User-defined labels for exact-match filtering. Up to 32 entries. Keys are 1–64 ASCII letters, digits, dots, underscores, slashes or hyphens, beginning with a letter or digit; constructor and prototype are reserved. Values are case-sensitive strings of up to 256 characters, including empty strings. |
data[].labels.{key} | string · max length 256 | Noadditional keys | — |
data[].labelsRevision | integer · ≥ 0; ≤ 2147483647 | Yeseach array item | Independent labels revision. Supply the last read revision when replacing labels; a stale revision returns 409. |
data[].networkPolicy | object · extra fields rejected | Yeseach array item | Environment-wide outbound policy, enforced by Sandbox0. Domain exceptions allow destinations in block-all mode and deny destinations in allow-all mode. Enabled egress credentials also allow their destinations in block-all mode. This policy does not restrict HTTP methods, paths, or local commands. |
data[].networkPolicy.mode | string · values: "allow-all" | "block-all" | Yeseach array item | Default for outbound traffic not matched by a domain exception or enabled credential destination. |
data[].networkPolicy.domainExceptions | array · max 500 items | Yeseach array item | Domains allowed in block-all mode or denied in allow-all mode. Exact names do not automatically include subdomains. |
data[].networkPolicy.domainExceptions[] | string · min length 1; max length 255 | Yeseach array item | Exact domain or wildcard suffix such as *.example.com. URLs, paths, ports and IP literals are not supported. Names are normalized to lowercase and deduplicated. |
data[].{key} | any | Noadditional keys | — |
nextCursor | string | No | Present only when more matching Environments remain. Use as before with the same filters and limit. |
Example
{
"data": [
{
"id": "",
"name": "",
"status": "ready",
"platform": {
"initialCheckpointStatus": "pending",
"workspaceRevision": -9007199254740991
},
"labels": {},
"labelsRevision": 0,
"networkPolicy": {
"mode": "allow-all",
"domainExceptions": [
"example"
]
}
}
]
}Error responses
401 Missing or invalid Platform API token.application/json
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}The list operation supports keyword search over the name, ID and repository URL, provisioning status, and repeated exact-match label conditions. All label conditions must match; values are case-sensitive. Console filters run on the server and stay in the page URL so the filtered view can be bookmarked or shared.
Pagination is optional for existing clients: pass a page size to receive bounded pages, then reuse the returned cursor with the same search/filter conditions. Omitting a page size preserves the complete-list behavior.