---
title: "List a work session’s threads"
---

> 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.

# List a work session’s threads

Path: CloudRaker Workspace API › Workspace Sessions

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

Every thread opened on the session, each rooted at the timeline `seq` it replies to — the set of `threadId` values an entry or a turn may name. Pages: `limit` is 1-200 (default 50) and `starting_after` takes the previous page’s last id; `hasMore` says whether another page follows. **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. Any denial is 404. A read-only caller reads the SANITIZED view, the same one its live socket gets.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

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

## Query parameters

- `limit` (`listWorkspaceSessionThreads.query.limit`; integer, optional) — Page size, 1-200 (default 50). Enforced: a bad value is 400 `validation_failed`.
  - min 1; max 200; example `50`
- `starting_after` (`listWorkspaceSessionThreads.query.starting_after`; string, optional) — The previous page’s last id.
  - minLength 1; maxLength 128

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

The session’s threads.

#### Example

```json
{
  "data": [
    {
      "archivedAt": "2019-08-24T14:15:22Z",
      "id": "thd_01J8Z…",
      "rootSeq": 12,
      "createdAt": "2019-08-24T14:15:22Z",
      "anchor": {
        "artifactId": "art_01J8Z…",
        "from": 512,
        "to": 640,
        "quote": "string",
        "sourceVersion": 9007199254740991
      }
    }
  ],
  "hasMore": true
}
```

- `data` (`listWorkspaceSessionThreads.response.200.data`; array<object>, required)
  - `id` (`listWorkspaceSessionThreads.response.200.data.id`; string, required)
    - example `"thd_01J8Z…"`
  - `rootSeq` (`listWorkspaceSessionThreads.response.200.data.rootSeq`; integer, required)
    - min -9007199254740991; max 9007199254740991; example `12`
  - `createdAt` (`listWorkspaceSessionThreads.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))$`
  - `anchor` (`listWorkspaceSessionThreads.response.200.data.anchor`; any of, required)
    - any of:
      - `object`
        - `artifactId` (`listWorkspaceSessionThreads.response.200.data.anchor.1.artifactId`; string, required)
          - minLength 1; maxLength 128; example `"art_01J8Z…"`
        - `from` (`listWorkspaceSessionThreads.response.200.data.anchor.1.from`; integer, required)
          - min 0; max 9007199254740991; example `512`
        - `to` (`listWorkspaceSessionThreads.response.200.data.anchor.1.to`; integer, required)
          - min 0; max 9007199254740991; example `640`
        - `quote` (`listWorkspaceSessionThreads.response.200.data.anchor.1.quote`; string, optional)
          - minLength 1; maxLength 2000
        - `sourceVersion` (`listWorkspaceSessionThreads.response.200.data.anchor.1.sourceVersion`; integer, optional)
          - min 0; max 9007199254740991
      - `null`
  - `archivedAt` (`listWorkspaceSessionThreads.response.200.data.archivedAt`; any of, optional)
    - any of: `string`, `null`
- `hasMore` (`listWorkspaceSessionThreads.response.200.hasMore`; boolean, required)

### 400

`validation_failed` — a bad `limit` or `starting_after`.

### 404

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


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