---
title: "List the artifacts of 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.

# List the artifacts of a work session

Path: CloudRaker Paperwork API › Work Sessions

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

Every document the session produced, oldest first. An artifact is `draft` until it is committed into a space. Page with `after`, which takes the previous page's last id; `nextCursor` is `null` at the end.

Fetch the bytes with `GET /v1/files/{fileId}`.

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

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

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

## Query parameters

- `after` (`listWorkSessionArtifacts.query.after`; string, optional)
  - minLength 1; maxLength 256
- `limit` (`listWorkSessionArtifacts.query.limit`; integer, optional)
  - min 1; max 200

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

One page of artifacts.

#### Example

```json
{
  "data": [
    {
      "id": "art_01J8Z…",
      "sessionId": "string",
      "fileId": "file_01J8Z…",
      "version": 2,
      "name": "msa-redlined.md",
      "mime": "text/markdown",
      "state": "draft",
      "producedByTurn": "string",
      "committedTo": {
        "spaceId": "string",
        "fileId": "string",
        "at": "2019-08-24T14:15:22Z",
        "by": "string"
      }
    }
  ],
  "nextCursor": "string"
}
```

- `data` (`listWorkSessionArtifacts.response.200.data`; array<object>, required)
  - `id` (`listWorkSessionArtifacts.response.200.data.id`; string, required)
    - example `"art_01J8Z…"`
  - `sessionId` (`listWorkSessionArtifacts.response.200.data.sessionId`; string, required)
    - minLength 1; maxLength 128
  - `fileId` (`listWorkSessionArtifacts.response.200.data.fileId`; string, required)
    - example `"file_01J8Z…"`
  - `version` (`listWorkSessionArtifacts.response.200.data.version`; integer, required)
    - min -9007199254740991; max 9007199254740991; example `2`
  - `name` (`listWorkSessionArtifacts.response.200.data.name`; string, required)
    - example `"msa-redlined.md"`
  - `mime` (`listWorkSessionArtifacts.response.200.data.mime`; string, required)
    - example `"text/markdown"`
  - `state` (`listWorkSessionArtifacts.response.200.data.state`; string, required)
    - one of `"draft"`, `"committed"`
  - `producedByTurn` (`listWorkSessionArtifacts.response.200.data.producedByTurn`; string | null, required)
  - `committedTo` (`listWorkSessionArtifacts.response.200.data.committedTo`; any of, required)
    - any of:
      - `object`
        - `spaceId` (`listWorkSessionArtifacts.response.200.data.committedTo.1.spaceId`; string, required)
        - `fileId` (`listWorkSessionArtifacts.response.200.data.committedTo.1.fileId`; string, required)
        - `at` (`listWorkSessionArtifacts.response.200.data.committedTo.1.at`; 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))$`
        - `by` (`listWorkSessionArtifacts.response.200.data.committedTo.1.by`; string, required)
      - `null`
- `nextCursor` (`listWorkSessionArtifacts.response.200.nextCursor`; string | null, required)

### 400

Validation Error

#### Example

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

- `success` (`listWorkSessionArtifacts.response.400.success`; boolean, required)
  - one of `false`
- `error` (`listWorkSessionArtifacts.response.400.error`; array<unknown>, required)
- `data` (`listWorkSessionArtifacts.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` (`listWorkSessionArtifacts.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`listWorkSessionArtifacts.response.429.message`; string, required)
- `retryable` (`listWorkSessionArtifacts.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`listWorkSessionArtifacts.response.429.requestId`; string, required)
- `docUrl` (`listWorkSessionArtifacts.response.429.docUrl`; string, optional)


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