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

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

Path: CloudRaker Workspace API › Workspace Sessions

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

Every artifact produced in the session, `draft` until it is committed into a space, with the turn that produced it and the version it is on. 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` (`listWorkspaceSessionArtifacts.path.sessionId`; string, required)

## Query parameters

- `limit` (`listWorkspaceSessionArtifacts.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` (`listWorkspaceSessionArtifacts.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>/artifacts' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

The session’s 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"
      }
    }
  ],
  "hasMore": true
}
```

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