Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Search trace threads

POST/v1/private/traces/threads/searchSearch trace threads

Search trace threads

Request body

application/json
objectTraceThreadSearchStreamRequest
filtersarray of object
Show child attributes
Show array items
fieldstring
keystring
operatorstring

one of "contains", "not_contains", "starts_with", "ends_with", "=", "!=", ">", ">=", "<", "<=", "is_empty", "is_not_empty", "in", "not_in"

valuestring
from_timestring · date-time

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

last_retrieved_thread_model_idstring · uuid
limitinteger · int32

Max number of trace thread to be streamed

default 500 · maximum 2000 · minimum 1

project_idstring · uuid
project_namestring
strip_attachmentsboolean

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

default false

to_timestring · date-time

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

truncateboolean

Truncate input, output and metadata to slim payloads

default true

Example request
{
  "filters": [
    {
      "field": "string",
      "key": "string",
      "operator": "!=",
      "value": "string"
    }
  ],
  "from_time": "2026-06-09T00:00:00Z",
  "last_retrieved_thread_model_id": "00000000-0000-0000-0000-000000000000",
  "limit": 500,
  "project_id": "00000000-0000-0000-0000-000000000000",
  "project_name": "string",
  "strip_attachments": false,
  "to_time": "2026-06-09T00:00:00Z",
  "truncate": true
}

Responses

200Trace threads stream or error during processapplication/octet-stream
array of string

maxItems 2000

Show array items
anyOf · 2 options
Option 1objectTraceThread
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
Option 2objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
[
  {
    "code": 0,
    "details": "string",
    "message": "string"
  }
]
400Bad Requestapplication/octet-stream
objectErrorMessage
codeinteger · int32
detailsstring
messagestring
Example response
{
  "code": 0,
  "details": "string",
  "message": "string"
}
Documentation menu