# get_session_sandbox

Source: <https://everruns.com/docs/api/operations/get_session_sandbox/>

GET

/v1/sessions/{session\_id}/sandbox

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/sandbox';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/sessions/example/sandbox
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/sandbox

Get the primary Sandbox a Session runs in: template, target, containment, and capabilities.

## Parameters

### Path Parameters

**session\_id**

required

string

Session ID

## Responses

### 200

Resolved primary Session Sandbox

Media typeapplication/json

The primary Sandbox a Session is running in.

object

**capabilities**

required

What the Sandbox target can actually do.

Read this before assuming a shell behaves like Linux. Bashkit reports `native_processes: false`, which is why a build fails there; the answer is available before the first turn rather than after a confusing tool error.

object

**native\_processes**

required

Whether commands can spawn operating-system processes.

boolean

**network\_enforced**

required

Whether the target enforces the declared outbound network policy.

boolean

**packages**

required

Whether the runtime can install operating-system packages.

boolean

**portable\_checkpoint**

required

Whether filesystem state has a portable checkpoint representation.

boolean

**ports**

required

Whether workloads can bind and expose network ports.

boolean

**pty**

required

Whether interactive pseudo-terminals are supported.

boolean

**containment**

required

What commands may touch, and who enforces it.

object

**level**

required

`none`, `native`, or `isolated`.

string

**network**

required

Outbound network policy: `deny`, `allowlist`, or `allow`.

string

**current\_checkpoint\_id**

Most recent checkpoint used to recover this logical Sandbox.

string | null

**desired\_state**

Control-plane lifecycle intent and latest observed physical state.

string | null

**durability**

required

`checkpointed`, `provider_snapshot`, or `none`. Declared per target, so a session on somebody else’s machine is never reported as recoverable.

string

**generation**

Physical incarnation fence. Increments whenever compute is replaced.

integer | null format: int64

**last\_activity\_at**

Last recorded runtime activity used by lifecycle policy.

string | null format: date-time

**name**

Agent template binding selected for this Session (`inline` for one-offs).

string | null

**observed\_state**

Latest lifecycle state observed from the physical provider resource.

string | null

**resolved\_from**

required

How this view was produced. `capabilities` means it was derived from the Session’s effective capability set rather than a stored Sandbox spec.

string

**role**

`primary` for the implicit shell/files binding.

string | null

**sandbox\_id**

Durable logical primary Sandbox id. Absent for legacy capability-derived sessions.

string | null

**sandbox\_template\_revision\_id**

Reusable Sandbox Template revision pinned into this Sandbox.

string | null

**source\_capability**

Capability that supplied the compute, for operators tracing a surprise.

string | null

**spec**

One of:

* object

  Immutable resolved specification pinned when the Session was created.

  object

  **bootstrap**

  required

  Pinned initialization commands.

  object

  **commands**

  Ordered commands replayed when creating or recovering physical compute.

  Array\<string>

  **containment**

  required

  Fully resolved containment contract.

  object

  **escalation**

  Whether the runtime may widen containment after Session creation.

  string

  Allowed values: never approval auto

  **filesystem**

  Filesystem mutation boundary for command execution.

  object

  **writable\_roots**

  Absolute roots the runtime may mutate; empty means provider default.

  Array\<string>

  **level**

  required

  Isolation mechanism the provider must supply.

  string

  Allowed values: none native isolated

  **network**

  One of:

  * object

    object

    **mode**

    required

    string

    Allowed values: deny

  * object

    object

    **allowed\_hosts**

    required

    Array\<string>

    **mode**

    required

    string

    Allowed values: allowlist

  * object

    object

    **mode**

    required

    string

    Allowed values: allow

  **durability**

  required

  Fully resolved recovery guarantee.

  string

  Allowed values: checkpointed provider\_snapshot none

  **lifecycle**

  required

  Pinned lifecycle policy.

  object

  **idle\_action**

  Action Everruns requests after the idle interval.

  string

  Allowed values: checkpoint\_and\_stop stop keep\_running

  **idle\_after\_seconds**

  Inactivity interval before applying `idle_action`.

  integer format: int64

  **target**

  required

  Exact target pinned for the Session.

  object

  **connection\_id**

  Credential/transport binding for a registered machine target.

  string | null

  **credential**

  Provider credential source. User and Agent bindings are resolved to an exact virtual user when the Session starts; organization bindings also pin the exact connection.

  object

  **connection\_id**

  Exact connection for organization grants, which may have several accounts for one provider.

  string | null format: uuid

  **source**

  required

  Identity scope from which the provider credential is resolved.

  string

  Allowed values: none session\_user agent organization

  **virtual\_user\_id**

  Exact virtual-user owner for user, Agent, and organization grants.

  string | null format: uuid

  **kind**

  required

  Provider-neutral target class.

  string

  Allowed values: host machine vfs container managed

  **options**

  Provider-owned, non-secret configuration. Credentials are references, never values in this object.

  object

  **provider**

  Concrete adapter for target kinds with more than one implementation.

  string | null

  **template\_revision\_id**

  Reusable revision from which this complete snapshot was copied.

  string | null

* null

  object

  **mode**

  required

  string

  Allowed values: deny

* object

  object

  **allowed\_hosts**

  required

  Array\<string>

  **mode**

  required

  string

  Allowed values: allowlist

* object

  object

  **mode**

  required

  string

  Allowed values: allow

* object

  null

**target**

One of:

* object

  Target, absent when the session has no compute at all and only reads and writes files. That is a real configuration, not a misconfiguration.

  object

  **connection\_id**

  Registered connection used by a machine target.

  string | null

  **kind**

  required

  Shape of the target: `host`, `machine`, `vfs`, `container`, `managed`.

  string

  **provider**

  Concrete provider, when the kind has one (`bashkit`, `daytona`, …).

  string | null

* null

  null

##### Example

```json
{
  "capabilities": {
    "native_processes": false,
    "network_enforced": true,
    "packages": false,
    "portable_checkpoint": true,
    "ports": false,
    "pty": false
  },
  "containment": {
    "level": "isolated",
    "network": "deny"
  },
  "durability": "checkpointed",
  "resolved_from": "capabilities",
  "source_capability": "bashkit_shell",
  "target": {
    "kind": "vfs",
    "provider": "bashkit"
  }
}
```

### 404

Session not found