> This page is for Workspace app.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# List a work session’s artifacts

GET https://api.cloudraker.com/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 (RKO-761 R9C-07). **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.

Reference: https://docs.cloudraker.com/workspace/api/workspace-sessions/list-workspace-session-artifacts

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `sessionId` (string, required)

### Query parameters

- `limit` (integer, optional) — Page size, 1-200 (default 50). Enforced: a bad value is 400 `validation_failed`.
- `starting_after` (string, optional) — The previous page’s last id.

## Response

### 200

The session’s artifacts.

- `data` (list of SessionArtifact, required)
- `hasMore` (boolean, required)

## Errors

### 400 Bad Request Error

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

- `any`

### 404 Not Found Error

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

- `any`

## Types

### SessionArtifact

- `id` (string, required)
- `sessionId` (string, required)
- `fileId` (string, required)
- `version` (integer, required)
- `name` (string, required)
- `mime` (string, required)
- `state` (enum, required)
  - Allowed values: `draft`, `committed`
- `producedByTurn` (string, required, nullable)
- `committedTo` (SessionArtifactCommittedTo, required, nullable)

### SessionArtifactCommittedTo

- `spaceId` (string, required)
- `fileId` (string, required)
- `at` (datetime, required)
- `by` (string, required)

## Examples

**Response**

```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": "2024-01-15T09:30:00Z",
        "by": "string"
      }
    }
  ],
  "hasMore": true
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/workspace/sessions/sessionId/artifacts"

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

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

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/workspace/sessions/sessionId/artifacts';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/workspace/sessions/sessionId/artifacts"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/workspace/sessions/sessionId/artifacts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cloudraker.com/workspace/sessions/sessionId/artifacts")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cloudraker.com/workspace/sessions/sessionId/artifacts', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/workspace/sessions/sessionId/artifacts");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/workspace/sessions/sessionId/artifacts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```