Once your application is instrumented and logs are flowing into the Monitor pillar, you can export that data programmatically. Use the export endpoints to feed traces and spans into data warehouses, build custom dashboards, power alerting pipelines, or run offline analysis that goes beyond what the Monitor UI provides. Adaline exposes three REST endpoints for reading log data. All three use cursor-based pagination and support the same filtering and response conventions used across the Adaline API.Documentation Index
Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Available endpoints
| Endpoint | Method | When to use |
|---|---|---|
| List traces | GET /v2/logs | Simple queries with query-string filters. |
| Search traces | POST /v2/logs/traces | Complex queries with body filters, range comparisons, and multi-condition filtering. |
| Search spans | POST /v2/logs/spans | Export model-level span data for a specific prompt — cost, tokens, latency per LLM call. |
Quick start
Fetch the most recent traces from a project:- cURL
- TypeScript
- Python
Pagination
All export endpoints use cursor-based pagination. Pass thenextCursor value from the previous response as cursor in the next request. When hasMore is false, you have reached the end.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Items per page (max 200). |
cursor | string | — | Opaque cursor from a previous response. Omit for the first page. |
Pagination loop
To export all matching data, loop untilhasMore is false:
- cURL
- TypeScript
- Python
Filtering
All endpoints support two complementary filtering mechanisms that are ANDed together: flat params for simple queries and a filters array for advanced comparisons.Flat params
Top-level fields for common filters. Use these for straightforward queries:| Field | Type | Description |
|---|---|---|
projectId | string | Required. Project to query. |
status | string | success, failure, aborted, cancelled, pending, unknown. |
startedAfter | number | Unix ms. Traces started at or after this time. |
startedBefore | number | Unix ms. Traces started at or before this time. |
name | string | Case-insensitive substring match on trace or span name. |
referenceId | string | Exact match. |
sessionId | string | Exact match. |
POST /v2/logs/spans) additionally supports model and provider for case-insensitive substring matching.
Filters array
For range queries, numeric comparisons, and multi-condition filtering on the same column, use thefilters array:
type:
| Type | Operators | Value type | Example columns |
|---|---|---|---|
string | eq, contains | string | name, referenceId, sessionId, model, provider |
number | eq, gt, gte, lt, lte | number | latency, totalCost, cost, totalInputTokens, totalOutputTokens |
datetime | gt, gte, lt, lte | number (Unix ms) | startedAt, endedAt |
arrayContains | contains | string | tags |
Available columns
Trace endpoints (GET /v2/logs, POST /v2/logs/traces):
startedAt, endedAt, status, name, referenceId, sessionId, latency, tags, totalCost, totalInputTokens, totalOutputTokens, traceId
Span endpoint (POST /v2/logs/spans) — all trace columns plus:
model, provider, cost, promptTokens, completionTokens, totalTokens, logTraceId
Common export patterns
| Goal | Approach |
|---|---|
| Nightly data sync | Paginate through all traces with startedAfter / startedBefore set to the previous day’s window. |
| Cost monitoring | Use the filters array with totalCost > threshold to surface expensive traces for alerting. |
| Model comparison | Export spans for two different models using the model filter, then compare latency and cost offline. |
| Session replay | Filter by sessionId to reconstruct a full multi-turn conversation for debugging or QA. |
| Compliance audit | Export all traces for a time window and pipe them into your data warehouse for retention. |
Search traces
POST /v2/logs/traces is the most flexible trace export endpoint. Use it when you need the filters array or complex multi-condition queries:
- cURL
- TypeScript
- Python
Search spans
POST /v2/logs/spans exports model-level span data for a specific prompt. Only spans with contentType of Model or ModelStream are returned — use this to analyze LLM performance at the individual-call level.
| Field | Required | Description |
|---|---|---|
promptId | Yes | Prompt to search model spans from. |
model | No | Case-insensitive substring match on model name. |
provider | No | Case-insensitive substring match on provider name. |
- cURL
- TypeScript
- Python
The
content, parsedContent, attributes, tags, and events fields on span objects are serialized JSON strings. Parse them in your application code to access the structured data.Error responses
| Status | Meaning |
|---|---|
400 | Invalid parameters or malformed cursor. |
401 | Missing or invalid API key. |
403 | API key does not have access to the requested project. |
404 | Project or prompt does not exist. |
500 | Internal server error. |
Next steps
Search Traces API
Full OpenAPI reference for the trace search endpoint.
Search Spans API
Full OpenAPI reference for the span search endpoint.
Filter and Search Logs
Use the Monitor UI to filter logs visually before exporting.
Analyze Log Charts
Spot trends with aggregated analytics, then export the underlying data.