---
title: "Read the session’s sandbox container state"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read the session’s sandbox container state

Path: CloudRaker Workspace API › Workspace Sessions

`GET /workspace/sessions/{sessionId}/sandbox`

Answers `{ state, sbxId?, lastSeenAt?, backupAt? }`. `none` — no container and no backup yet; `queued` — a turn is waiting for one of the organization’s container slots; `provisioning` / `ready` — a turn is live; `sleeping` — nothing is running and the last `/workspace` backup is what the next turn restores. A pure read: it never provisions a container. **Authorization:** the session read gate; any denial is 404.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `sessionId` (`getWorkspaceSessionSandbox.path.sessionId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/workspace/sessions/<sessionId>/sandbox' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/workspace/sessions/<sessionId>/sandbox';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/workspace/sessions/<sessionId>/sandbox"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The container state.

#### Example

```json
{
  "state": "none",
  "sbxId": "string",
  "lastSeenAt": "2019-08-24T14:15:22Z",
  "backupAt": "2019-08-24T14:15:22Z"
}
```

- `state` (`getWorkspaceSessionSandbox.response.200.state`; string, required)
  - one of `"none"`, `"queued"`, `"provisioning"`, `"ready"`, `"sleeping"`
- `sbxId` (`getWorkspaceSessionSandbox.response.200.sbxId`; string, optional)
- `lastSeenAt` (`getWorkspaceSessionSandbox.response.200.lastSeenAt`; string, optional)
  - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
- `backupAt` (`getWorkspaceSessionSandbox.response.200.backupAt`; string, optional)
  - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`

### 404

No such session, or the caller may not see it.


Source: https://docs.cloudraker.com/workspace/api/workspace-sessions/get-workspace-session-sandbox/index.md
