> 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 timeline entries

GET https://api.cloudraker.com/workspace/sessions/{sessionId}/entries

Timeline entries ordered by `seq`, which is gapless and monotonic, so a client pages forward with `afterSeq`. This is the ONLY way to read a timeline in full: the live socket replays at most the last 200 entries, so a client that needs the whole history pages here and then attaches. `seq` is WRITE order, not cause order: a mention starts its turns before the comment that asked for them is written (a refused turn must leave no orphan message behind), so a `turn_started` sits just ABOVE its comment. The comment names them — `startedTurnIds` on the entry — so a reader that wants cause order renders those `turn_started` entries directly below the comment that claims them. `afterSeq` and `limit` are ENFORCED: `afterSeq` is an integer ≥ 0 and `limit` is 1-200 (default 50), and anything else is 400 `validation_failed` — never a silent page one, which is how a client with a corrupted cursor used to loop forever (R9-02 / R9C-04). **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 caller who may read but not WRITE the session reads the SANITIZED view, the same one its live socket gets: a tool part keeps its name and loses its `input`, `output` and `errorText`, and url-ish values are redacted.

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

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

- `afterSeq` (integer, optional) — Return only entries with a `seq` GREATER than this. `seq` is gapless and monotonic, so the last entry of a page is the next page’s `afterSeq`.
- `limit` (integer, optional) — Page size, 1-200 (default 50).

## Response

### 200

One page of entries.

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

## Errors

### 400 Bad Request Error

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

- `any`

### 404 Not Found Error

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

- `any`

## Types

### WorkSessionEntry

- `seq` (integer, required)
- `id` (string, required)
- `kind` (enum, required)
  - Allowed values: `comment`, `system`, `turn_started`, `turn_finished`, `turn_message`, `approval`, `task`, `question`, `artifact`, `commit`, `handoff`, `trigger`
- `at` (datetime, required)
- `role` (enum, required)
  - Allowed values: `user`, `assistant`, `system`
- `author` (WorkSessionSender, required)
- `threadId` (string, required, nullable)
- `turnId` (string, required, nullable)
- `parts` (list of map from string to any, required)
- `startedTurnIds` (list of string, required)
- `updatedSeq` (integer, required, nullable)

### WorkSessionSender

- `kind` (enum, required)
  - Allowed values: `user`, `agent`, `api_key`, `trigger`, `external`
- `id` (string, required)
- `name` (string, required)
- `avatarUrl` (string, optional)
- `source` (enum, optional)
  - Allowed values: `web`, `desktop`, `api`, `email`, `webhook`, `schedule`, `slack`, `assistant`, `manual`, `trigger`

## Examples

**Response**

```json
{
  "data": [
    {
      "seq": 1,
      "id": "string",
      "kind": "comment",
      "at": "2024-01-15T09:30:00Z",
      "role": "user",
      "author": {
        "kind": "user",
        "id": "string",
        "name": "string",
        "avatarUrl": "string",
        "source": "web"
      },
      "threadId": "string",
      "turnId": "string",
      "parts": [
        {}
      ],
      "startedTurnIds": [
        "string"
      ],
      "updatedSeq": 1
    }
  ],
  "hasMore": true
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

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

	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/entries")

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/entries")
  .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/entries', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/workspace/sessions/sessionId/entries");
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/entries")! 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()
```