Skip to main content
POST
/
logs
/
spans
Search spans
curl --request POST \
  --url https://api.adaline.ai/v2/logs/spans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "promptId": "<string>",
  "startedAfter": 123,
  "startedBefore": 123,
  "status": "success",
  "name": "<string>",
  "referenceId": "<string>",
  "sessionId": "<string>",
  "model": "<string>",
  "provider": "<string>",
  "filters": [
    {
      "type": "string",
      "column": "<string>",
      "operator": "<string>",
      "value": "<unknown>"
    }
  ],
  "sort": "startedAt:asc",
  "limit": 100,
  "cursor": "<string>"
}
'
{
  "data": [
    {}
  ],
  "pagination": {
    "limit": 123,
    "returned": 1,
    "hasMore": true,
    "nextCursor": "<string>"
  }
}
Returns a cursor-paginated page of filtered model span rows for a prompt. Pass nextCursor from the response as cursor to fetch the next page. See Export Logs for filter types, available columns, and pagination conventions.

Authorizations

Authorization
string
header
required

Workspace API key. Pass as Authorization: Bearer <key>.

Body

application/json

Request payload for paginated span export.

projectId
string
required

The project that owns the prompt.

Required string length: 20 - 80
promptId
string
required

The prompt to export model spans from.

Required string length: 20 - 80
startedAfter
integer

Unix timestamp in milliseconds. Only return rows started at or after this time.

startedBefore
integer

Unix timestamp in milliseconds. Only return rows started at or before this time.

status
enum<string>

Filter by status.

Available options:
success,
failure,
aborted,
cancelled,
pending,
unknown
name
string

Case-insensitive substring match on the trace or span name.

referenceId
string

Exact match on the reference ID.

sessionId
string

Exact match on the session ID.

model
string

Case-insensitive substring match on the model name.

provider
string

Case-insensitive substring match on the provider name.

filters
Log Filter Object · object[]

Typed filter objects for advanced queries. ANDed with flat params.

Maximum array length: 20
sort
enum<string>

Sort order. Defaults to startedAt:desc.

Available options:
startedAt:asc,
startedAt:desc
limit
integer

Page size. Defaults to 50, max 200.

Required range: 1 <= x <= 200
cursor
string

Opaque pagination cursor from a previous response.

Response

A page of exported rows with cursor-based pagination metadata.

data
object[]

Array of exported rows for this page.

pagination
Pagination · object

Pagination metadata for list endpoints with cursor-based navigation.