---
title: "Read one work session"
---

> 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 one work session

Path: CloudRaker Workspace API › Workspace Sessions

`GET /workspace/sessions/{sessionId}`

The authoritative session — read live, never from the list projection, so status and counts are always fresh. `counts.unread` is the CALLER’s own open `inbox_items` rows on this session (spec §6) — per viewer, so it is resolved here rather than held on the session record. **Authorization:** `work_session:read` on the session, OR `space:contribute` on one of its linked spaces; a desk session is readable only by its owner, even by an administrator. Any denial is 404. A caller who may read but not WRITE the session reads the SANITIZED view, the same one its live socket and its `/entries` page get: url-ish keys and url-ish values are redacted.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/workspace/sessions/<sessionId>';
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>"

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

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

print(response.text)
```

## Responses

### 200

The work session.

#### Example

```json
{
  "data": {
    "id": "string",
    "title": "string",
    "description": "string",
    "status": "open",
    "workStatus": "active",
    "openedBy": {
      "kind": "user",
      "id": "string",
      "name": "string",
      "avatarUrl": "string",
      "source": "web"
    },
    "openedVia": "web",
    "participants": {
      "humans": [
        "string"
      ],
      "agents": [
        {
          "agentId": "string",
          "versionId": "string",
          "handle": "string",
          "name": "string",
          "role": "string",
          "joinedAt": "2019-08-24T14:15:22Z"
        }
      ]
    },
    "spaces": [
      {
        "spaceId": "string",
        "access": "read"
      }
    ],
    "files": [
      {
        "fileId": "string",
        "role": "input"
      }
    ],
    "triggerId": "string",
    "parentSessionId": "string",
    "counts": {
      "turns": 0,
      "approvalsPending": 0,
      "tasksPending": 0,
      "unread": 0
    },
    "lastActivityAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "closedAt": "string"
  }
}
```

- `data` (`getWorkspaceSession.response.200.data`; object, required)
  - `id` (`getWorkspaceSession.response.200.data.id`; string, required)
    - minLength 1; maxLength 128
  - `title` (`getWorkspaceSession.response.200.data.title`; string, required)
    - maxLength 200
  - `description` (`getWorkspaceSession.response.200.data.description`; string, required)
    - maxLength 8000
  - `status` (`getWorkspaceSession.response.200.data.status`; string, required)
    - one of `"open"`, `"working"`, `"waiting"`, `"done"`, `"archived"`
  - `workStatus` (`getWorkspaceSession.response.200.data.workStatus`; string, required) — Whether the WORK is done, which only people decide. `status` stays the derived state of the turns.
    - one of `"active"`, `"ready_for_review"`, `"done"`
  - `openedBy` (`getWorkspaceSession.response.200.data.openedBy`; object, required)
    - `kind` (`getWorkspaceSession.response.200.data.openedBy.kind`; string, required)
      - one of `"user"`, `"agent"`, `"api_key"`, `"trigger"`, `"external"`
    - `id` (`getWorkspaceSession.response.200.data.openedBy.id`; string, required)
      - minLength 1; maxLength 128
    - `name` (`getWorkspaceSession.response.200.data.openedBy.name`; string, required)
      - minLength 1; maxLength 120
    - `avatarUrl` (`getWorkspaceSession.response.200.data.openedBy.avatarUrl`; string, optional)
      - maxLength 2048
    - `source` (`getWorkspaceSession.response.200.data.openedBy.source`; string, optional)
      - one of `"web"`, `"desktop"`, `"api"`, `"email"`, `"webhook"`, `"schedule"`, `"slack"`, `"assistant"`, `"manual"`, `"trigger"`
  - `openedVia` (`getWorkspaceSession.response.200.data.openedVia`; string, required)
    - one of `"web"`, `"desktop"`, `"api"`, `"email"`, `"webhook"`, `"schedule"`, `"slack"`, `"assistant"`
  - `participants` (`getWorkspaceSession.response.200.data.participants`; object, required)
    - `humans` (`getWorkspaceSession.response.200.data.participants.humans`; array<string>, required)
    - `agents` (`getWorkspaceSession.response.200.data.participants.agents`; array<object>, required)
      - `agentId` (`getWorkspaceSession.response.200.data.participants.agents.agentId`; string, required)
      - `versionId` (`getWorkspaceSession.response.200.data.participants.agents.versionId`; string, required)
      - `handle` (`getWorkspaceSession.response.200.data.participants.agents.handle`; string, required)
      - `name` (`getWorkspaceSession.response.200.data.participants.agents.name`; string, required)
      - `role` (`getWorkspaceSession.response.200.data.participants.agents.role`; string, required)
      - `joinedAt` (`getWorkspaceSession.response.200.data.participants.agents.joinedAt`; string, required)
        - 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))$`
  - `spaces` (`getWorkspaceSession.response.200.data.spaces`; array<object>, required)
    - `spaceId` (`getWorkspaceSession.response.200.data.spaces.spaceId`; string, required)
    - `access` (`getWorkspaceSession.response.200.data.spaces.access`; string, required)
      - one of `"read"`, `"commit"`
  - `files` (`getWorkspaceSession.response.200.data.files`; array<object>, required)
    - `fileId` (`getWorkspaceSession.response.200.data.files.fileId`; string, required)
    - `role` (`getWorkspaceSession.response.200.data.files.role`; string, required)
      - one of `"input"`, `"artifact"`
  - `triggerId` (`getWorkspaceSession.response.200.data.triggerId`; string | null, required)
  - `parentSessionId` (`getWorkspaceSession.response.200.data.parentSessionId`; string | null, required)
  - `counts` (`getWorkspaceSession.response.200.data.counts`; object, required)
    - `turns` (`getWorkspaceSession.response.200.data.counts.turns`; number, required)
    - `approvalsPending` (`getWorkspaceSession.response.200.data.counts.approvalsPending`; number, required)
    - `tasksPending` (`getWorkspaceSession.response.200.data.counts.tasksPending`; number, required)
    - `unread` (`getWorkspaceSession.response.200.data.counts.unread`; number, required)
  - `lastActivityAt` (`getWorkspaceSession.response.200.data.lastActivityAt`; string, required)
    - 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))$`
  - `createdAt` (`getWorkspaceSession.response.200.data.createdAt`; string, required)
    - 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))$`
  - `closedAt` (`getWorkspaceSession.response.200.data.closedAt`; string | null, required)

### 404

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


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