---
title: "List the work sessions the caller can see"
---

> 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 the work sessions the caller can see

Path: CloudRaker Workspace API › Workspace Sessions

`GET /workspace/sessions`

One keyset page of work sessions, MOST RECENTLY ACTIVE first (`lastActivityAt`, which is also what `nextCursor` carries), read from the `work_sessions` projection with a single query. **Authorization:** a session is listed when the caller holds `work_session:read`, or when it is linked to a space the caller holds `space:contribute` on — the SAME permission the detail route is gated on, so the list never advertises a session every other route answers 404 on; administrators see every session EXCEPT other people’s desk sessions, which are private by identity. Optional `filter` is `mine`, `shared`, `space:<spaceId>` or `agent:<agentId>`; `status` narrows by derived status and `workStatus` by the status a person set; `limit` is 1-50 (default 25) and `starting_after` takes the previous page’s `nextCursor`. Every one of them is ENFORCED — an unknown `filter`, a `limit` outside 1-50 or a status outside the enum is 400 `validation_failed`, never a quietly unfiltered page (R7-03 / R7C-04). The projection is best-effort, so a session opened seconds ago may take a moment to appear.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Query parameters

- `q` (`listWorkspaceSessions.query.q`; string, optional)
  - maxLength 200
- `filter` (`listWorkspaceSessions.query.filter`; any of, optional) — One of `mine` (opened by the caller), `shared` (the caller is a participant on someone else’s session), `space:<spaceId>` or `agent:<agentId>`. Any other value is 400 `validation_failed`.
  - example `"mine"`
  - any of:
    - `string`: one of `"mine"`, `"shared"`
    - `string`
    - `string`
- `status` (`listWorkspaceSessions.query.status`; string, optional) — Only sessions in this derived status.
  - one of `"open"`, `"working"`, `"waiting"`, `"done"`, `"archived"`
- `workStatus` (`listWorkspaceSessions.query.workStatus`; string, optional) — Only sessions a person has set to this work status.
  - one of `"active"`, `"ready_for_review"`, `"done"`
- `limit` (`listWorkspaceSessions.query.limit`; integer, optional) — Page size, 1-50 (default 25).
  - min 1; max 50; example `25`
- `starting_after` (`listWorkspaceSessions.query.starting_after`; string, optional) — The previous page’s `nextCursor` — `<ISO-8601 timestamp>|<row id>` (a bare timestamp is still accepted). Anything else is 400 `validation_failed`.

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

One page of work sessions.

#### Example

```json
{
  "data": [
    {
      "id": "string",
      "title": "string",
      "description": "string",
      "status": "open",
      "workStatus": "active",
      "openedByUserId": "string",
      "openedVia": "string",
      "participantUserIds": [
        "string"
      ],
      "agentIds": [
        "string"
      ],
      "spaceIds": [
        "string"
      ],
      "primarySpaceId": "string",
      "counts": {
        "turns": 0,
        "approvalsPending": 0,
        "tasksPending": 0,
        "unread": 0
      },
      "lastActivityAt": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "archivedAt": "string"
    }
  ],
  "nextCursor": "string"
}
```

- `data` (`listWorkspaceSessions.response.200.data`; array<object>, required)
  - `id` (`listWorkspaceSessions.response.200.data.id`; string, required)
    - minLength 1; maxLength 128
  - `title` (`listWorkspaceSessions.response.200.data.title`; string, required)
  - `description` (`listWorkspaceSessions.response.200.data.description`; string, required)
  - `status` (`listWorkspaceSessions.response.200.data.status`; string, required)
    - one of `"open"`, `"working"`, `"waiting"`, `"done"`, `"archived"`
  - `workStatus` (`listWorkspaceSessions.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"`
  - `openedByUserId` (`listWorkspaceSessions.response.200.data.openedByUserId`; string | null, required)
  - `openedVia` (`listWorkspaceSessions.response.200.data.openedVia`; string | null, required)
  - `participantUserIds` (`listWorkspaceSessions.response.200.data.participantUserIds`; array<string>, required)
  - `agentIds` (`listWorkspaceSessions.response.200.data.agentIds`; array<string>, required)
  - `spaceIds` (`listWorkspaceSessions.response.200.data.spaceIds`; array<string>, required)
  - `primarySpaceId` (`listWorkspaceSessions.response.200.data.primarySpaceId`; string | null, required)
  - `counts` (`listWorkspaceSessions.response.200.data.counts`; object, required)
    - `turns` (`listWorkspaceSessions.response.200.data.counts.turns`; number, required)
    - `approvalsPending` (`listWorkspaceSessions.response.200.data.counts.approvalsPending`; number, required)
    - `tasksPending` (`listWorkspaceSessions.response.200.data.counts.tasksPending`; number, required)
    - `unread` (`listWorkspaceSessions.response.200.data.counts.unread`; number, required)
  - `lastActivityAt` (`listWorkspaceSessions.response.200.data.lastActivityAt`; string | null, required)
  - `createdAt` (`listWorkspaceSessions.response.200.data.createdAt`; string | null, required)
  - `updatedAt` (`listWorkspaceSessions.response.200.data.updatedAt`; string | null, required)
  - `archivedAt` (`listWorkspaceSessions.response.200.data.archivedAt`; string | null, required)
- `nextCursor` (`listWorkspaceSessions.response.200.nextCursor`; string | null, required)

### 400

`validation_failed` — a bad `filter`, `status` or `limit`.


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