> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Traces

> List trace logs for a session.

> [!WARNING]
>
> You are reading the docs of Galtea 5.17. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/trace/list.md).

## Returns

Returns a list of [Trace](https://docs.galtea.ai/v5.17/concepts/product/version/session/trace.md) objects.

## Example

```python theme={"system"}
trace = galtea.traces.list(session_id=session_id)
```

## Parameters

**session\_id** `string | list[string]`

The ID or IDs of the session(s) to get traces for.

**from\_created\_at** `str | int` (default: None)

Filter traces created at or after this timestamp. Accepts ISO 8601 string (e.g., `'2024-01-01T00:00:00Z'`) or Unix timestamp in seconds. Can be used independently or together with `to_created_at`.

**to\_created\_at** `str | int` (default: None)

Filter traces created at or before this timestamp. Accepts ISO 8601 string (e.g., `'2024-12-31T23:59:59Z'`) or Unix timestamp in seconds. Can be used independently or together with `from_created_at`.

**sort\_by\_created\_at** `string`

Sort traces by creation date. Valid values are "asc" and "desc".

**offset** `int` (default: 0)

Number of traces to skip before starting to collect results. Use for pagination.

**Default:** `0` (start from the beginning)

**limit** `int` (default: 10000)

Maximum number of traces to return in a single request.

**Default:** `10000`

**id** `string | list[string]` (default: None)

The ID or IDs of the trace(s) to retrieve.

**restore\_files** `bool` (default: False)

Return each stored Galtea file token in a trace's input and output as the file it names, in the form it was sent in (a data URI, or raw base64 for a provider byte field). A file that is missing or over 20 MB keeps its token. The restored text of one call is at most 50 MB, else the call fails. By default you get the stored token text. See [Content parts](https://docs.galtea.ai/v5.17/concepts/product/version/session/content-parts.md).

> [!NOTE]
>
> At least one of the 2 filter parameters (`session_id`, `id`) described above must be passed to the method


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.