# Read a room's logs

Source: https://docs.vlayers.ai/reference/hosting/get-room-logs

`GET /v1/rooms/{id}/logs` · scope `room_logs:read`

Reads what both containers of a room wrote: your process and the VoiceLayer shim beside it. Without `after` you get the newest lines, oldest first; pass the `id` of the last line you saw as `after` to follow the room as it runs. Lines are kept for the number of days in `retentionDays`.

Requires an API key with the `room_logs:read` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The room id. Example: `"room_0192f5d4-8b9c-7dae-8f3a-4b5c6d7e8f90"` |
| `container` | query | "process" \| "shim" | no | Only one container: `process` (your code) or `shim` (VoiceLayer's side). Example: `"process"` |
| `stream` | query | "stdout" \| "stderr" | no | Only `stdout` or `stderr`. Example: `"stdout"` |
| `since` | query | string | no | Only lines at or after this time (ISO 8601). Example: `"2026-10-20T15:04:05.000Z"` |
| `until` | query | string | no | Only lines before this time (ISO 8601). Example: `"2026-10-20T15:04:05.000Z"` |
| `q` | query | string | no | Only lines containing this text, ignoring case. Example: `"timeout"` |
| `after` | query | integer | no | Only lines after this line id: pass the last `id` you saw to follow the room. Example: `1204` |
| `limit` | query | integer | no | How many items to return, 1–1000. Default 200. Example: `20` |

## Request

cURL:

```bash
curl "https://api.vlayers.ai/v1/rooms/$ROOM_ID/logs?container=process&limit=100" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { lines } = await voicelayer.hosting.getRoomLogs('<room-id>', {
  container: 'process',
  limit: 100
});
console.log(lines);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.hosting.get_room_logs("<room-id>", container="process", limit=100)
print(result.lines)
```

## Response `200`

```json
{
  "roomId": "room_0192f5d4-8b9c-7dae-8f3a-4b5c6d7e8f90",
  "lines": [
    {
      "id": 1204,
      "roomId": "room_0192f5d4-8b9c-7dae-8f3a-4b5c6d7e8f90",
      "container": "process",
      "stream": "stdout",
      "at": "2026-10-20T15:04:05.000Z",
      "line": "listening on :8080"
    }
  ],
  "retentionDays": 14
}
```
