Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Get trace threads

GET/v1/private/traces/threadsGet trace threads

Get trace threads

Parameters

pageinteger · int32query

default 1 · minimum 1

sizeinteger · int32query

default 10 · minimum 1

project_namestringquery
project_idstring · uuidquery
truncatebooleanquery

Truncate input, output and metadata to slim payloads

default false

strip_attachmentsbooleanquery

If true, returns attachment references like [file.png]; if false, downloads and reinjects stripped attachments

default false

filtersstringquery
sortingstringquery
searchstringquery

Full-text search across thread fields

from_timestring · date-timequery

Filter trace threads created from this time (ISO-8601 format).

to_timestring · date-timequery

Filter trace threads created up to this time (ISO-8601 format). If not provided, defaults to current time. Must be after 'from_time'.

annotation_queue_idstring · uuidquery

Filter threads belonging to this annotation queue and scope feedback scores/comments to it

Responses

200Trace threads resourceapplication/json
objectTraceThreadPage
contentarray of object
Show child attributes
Show array items
commentsarray of object
Show child attributes
Show array items
created_atstring · date-time
created_bystring
idstring · uuid
last_updated_atstring · date-time
last_updated_bystring
source_queue_idstring · uuid
textstringrequired

minLength 1

created_atstring · date-time
created_bystring
durationnumber · double
end_timestring · date-time
environmentstring
feedback_scoresarray of object
Show child attributes
Show array items
category_namestring
created_atstring · date-time
created_bystring
last_updated_atstring · date-time
last_updated_bystring
namestringrequired

minLength 1

reasonstring
sourcestringrequired

one of "ui", "sdk", "online_scoring"

source_queue_idstring · uuid
valuenumberrequired

maximum 1000000000 · minimum -1000000000

value_by_authorobject
first_messageobject
Show child attributes
anyOf · 3 options
Option 1object
Option 2array of object
Option 3string
idstring
last_messageobjectJsonListString ↑
last_updated_atstring · date-time
last_updated_bystring
number_of_messagesinteger · int64
project_idstring · uuid
start_timestring · date-time
statusstring

one of "active", "inactive"

tagsarray of string

uniqueItems true

Show child attributes

uniqueItems true

thread_model_idstring · uuid
total_estimated_costnumber
usageobject
pageinteger · int32
sizeinteger · int32
sortableByarray of string
Show child attributes
totalinteger · int64
Example response
{
  "content": [
    {
      "comments": [
        {
          "created_at": "2026-06-09T00:00:00Z",
          "created_by": "string",
          "id": "00000000-0000-0000-0000-000000000000",
          "last_updated_at": "2026-06-09T00:00:00Z",
          "last_updated_by": "string",
          "source_queue_id": "00000000-0000-0000-0000-000000000000",
          "text": "string"
        }
      ],
      "created_at": "2026-06-09T00:00:00Z",
      "created_by": "string",
      "duration": 0,
      "end_time": "2026-06-09T00:00:00Z",
      "environment": "string",
      "feedback_scores": [
        {
          "category_name": "string",
          "created_at": "2026-06-09T00:00:00Z",
          "created_by": "string",
          "last_updated_at": "2026-06-09T00:00:00Z",
          "last_updated_by": "string",
          "name": "string",
          "reason": "string",
          "source": "online_scoring",
          "source_queue_id": "00000000-0000-0000-0000-000000000000",
          "value": 0,
          "value_by_author": {
            "additionalProp1": {
              "author": "string",
              "category_name": "string",
              "last_updated_at": "2026-06-09T00:00:00Z",
              "reason": "string",
              "source": "online_scoring",
              "source_queue_id": "string",
              "span_id": "string",
              "span_type": "string",
              "value": 0
            }
          }
        }
      ],
      "first_message": [
        {}
      ],
      "id": "string",
      "last_message": [
        {}
      ],
      "last_updated_at": "2026-06-09T00:00:00Z",
      "last_updated_by": "string",
      "number_of_messages": 0,
      "project_id": "00000000-0000-0000-0000-000000000000",
      "start_time": "2026-06-09T00:00:00Z",
      "status": "active",
      "tags": [
        "string"
      ],
      "thread_model_id": "00000000-0000-0000-0000-000000000000",
      "total_estimated_cost": 0,
      "usage": {
        "additionalProp1": 0
      }
    }
  ],
  "page": 0,
  "size": 0,
  "sortableBy": [
    "string"
  ],
  "total": 0
}
Documentation menu