---
title: "Get a 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.

# Get a work session

Path: CloudRaker Paperwork API › Work Sessions

`GET /v1/work-sessions/{id}`

Reads one work session: its status, the agents on it, the spaces and files it works with, and the counts a client polls.

Answers `404` for a session another API key opened, unless that key set `apiVisible: true`.

**Learn more:** [Work sessions](https://docs.cloudraker.com/paperwork/api)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `id` (`getWorkSession.path.id`; string, required)
  - minLength 1; maxLength 128

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

The work session.

#### Example

```json
{
  "data": {
    "object": "work_session",
    "id": "string",
    "status": "open",
    "title": "string",
    "description": "string",
    "agents": [
      {
        "id": "string",
        "handle": "string",
        "name": "string",
        "role": "string"
      }
    ],
    "spaceIds": [
      "string"
    ],
    "fileIds": [
      "string"
    ],
    "counts": {
      "turns": -9007199254740991,
      "approvalsPending": -9007199254740991,
      "tasksPending": -9007199254740991
    },
    "apiVisible": true,
    "webhookUrl": "string",
    "createdAt": "string",
    "lastActivityAt": "string",
    "closedAt": "string",
    "entriesUrl": "string",
    "streamUrl": "string",
    "artifactsUrl": "string"
  }
}
```

- `data` (`getWorkSession.response.200.data`; object, required)
  - `object` (`getWorkSession.response.200.data.object`; string, required)
  - `id` (`getWorkSession.response.200.data.id`; string, required)
  - `status` (`getWorkSession.response.200.data.status`; string, required)
    - one of `"open"`, `"working"`, `"waiting"`, `"done"`, `"archived"`
  - `title` (`getWorkSession.response.200.data.title`; string, required)
  - `description` (`getWorkSession.response.200.data.description`; string, required)
  - `agents` (`getWorkSession.response.200.data.agents`; array<object>, required)
    - `id` (`getWorkSession.response.200.data.agents.id`; string, required)
    - `handle` (`getWorkSession.response.200.data.agents.handle`; string, required)
    - `name` (`getWorkSession.response.200.data.agents.name`; string, required)
    - `role` (`getWorkSession.response.200.data.agents.role`; string, required)
  - `spaceIds` (`getWorkSession.response.200.data.spaceIds`; array<string>, required)
  - `fileIds` (`getWorkSession.response.200.data.fileIds`; array<string>, required)
  - `counts` (`getWorkSession.response.200.data.counts`; object, required)
    - `turns` (`getWorkSession.response.200.data.counts.turns`; integer, required)
      - min -9007199254740991; max 9007199254740991
    - `approvalsPending` (`getWorkSession.response.200.data.counts.approvalsPending`; integer, required)
      - min -9007199254740991; max 9007199254740991
    - `tasksPending` (`getWorkSession.response.200.data.counts.tasksPending`; integer, required)
      - min -9007199254740991; max 9007199254740991
  - `apiVisible` (`getWorkSession.response.200.data.apiVisible`; boolean, required)
  - `createdAt` (`getWorkSession.response.200.data.createdAt`; string, required)
  - `lastActivityAt` (`getWorkSession.response.200.data.lastActivityAt`; string, required)
  - `closedAt` (`getWorkSession.response.200.data.closedAt`; string | null, required)
  - `entriesUrl` (`getWorkSession.response.200.data.entriesUrl`; string, required)
  - `streamUrl` (`getWorkSession.response.200.data.streamUrl`; string, required)
  - `artifactsUrl` (`getWorkSession.response.200.data.artifactsUrl`; string, required)
  - `webhookUrl` (`getWorkSession.response.200.data.webhookUrl`; string, optional)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`getWorkSession.response.400.success`; boolean, required)
  - one of `false`
- `error` (`getWorkSession.response.400.error`; array<unknown>, required)
- `data` (`getWorkSession.response.400.data`; unknown, required)

### 401

Missing or invalid credential.

### 403

The credential may not use the /v1 API.

### 404

Unknown session id, or it belongs to another API key.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`getWorkSession.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`getWorkSession.response.429.message`; string, required)
- `retryable` (`getWorkSession.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`getWorkSession.response.429.requestId`; string, required)
- `docUrl` (`getWorkSession.response.429.docUrl`; string, optional)


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