Query Thread Traces
Alpha: The request and response contract may change; Retrieve all traces belonging to a specific thread within a project.
Path parameters
Thread ID
Query parameters
cursor is the opaque string from a previous response's next_cursor. Omit on the first request; pass the returned cursor to fetch the next page.
filter narrows which traces are returned for this thread, using a LangSmith filter expression evaluated against each root trace run. For example: eq(status, "success") or has(tags, "production"). See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
page_size is the maximum number of traces to return in this response. Defaults to 20 when omitted; must be between 1 and 100 inclusive when set.
project_id is the tracing project UUID (required).
selects lists which properties to include on each returned trace (repeatable query parameter). Accepts any value of the ThreadTraceSelectField enum. Properties not listed are omitted from each trace object; trace_id is always returned.
Response
items and pagination
Example response
{
"items": [
{
"end_time": "2025-01-15T12:00:01.500Z",
"first_token_time": "2024-01-15T10:30:00.312Z",
"start_time": "2025-01-15T12:00:00.000Z",
"thread_id": "d4e5f6a7-b8c9-4d5e-1f2a-3b4c5d6e7f8a",
"trace_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9327"
}
],
"next_cursor": "eyJydW5zX2N1cnNvciI6Imx0KGN1cnNvciwiLi4uIikifQ=="
}Changes
Changed in 2 of the 48 revisions of this API.1433
- ●
removed the optional property
has_morefrom the response with the200statusresponse-optional-property-removed
- ○
the endpoint scheme security
API Key AND Tenant IDwas added to the APIapi-security-added
- ○
the endpoint scheme security
Bearer Auth AND Tenant IDwas added to the APIapi-security-added
- ○
the endpoint scheme security
API Keywas removed from the APIapi-security-removed
- ○
the endpoint scheme security
Bearer Authwas removed from the APIapi-security-removed
- ○
the endpoint scheme security
Tenant IDwas removed from the APIapi-security-removed
- ○
added the non-success response with the status
401response-non-success-status-added
- ○
added the non-success response with the status
404response-non-success-status-added
- ○
added the non-success response with the status
500response-non-success-status-added
- ○
added the non-success response with the status
503response-non-success-status-added
- ○
added the non-success response with the status
504response-non-success-status-added
- ○
added the optional property
detailto the response with the400statusresponse-optional-property-added
- ○
added the optional property
detailto the response with the403statusresponse-optional-property-added
- ○
added the optional property
detailto the response with the422statusresponse-optional-property-added
- ○
added the optional property
instanceto the response with the400statusresponse-optional-property-added
- ○
added the optional property
instanceto the response with the403statusresponse-optional-property-added
- ○
added the optional property
instanceto the response with the422statusresponse-optional-property-added
- ○
added the optional property
remedyto the response with the400statusresponse-optional-property-added
- ○
added the optional property
remedyto the response with the403statusresponse-optional-property-added
- ○
added the optional property
remedyto the response with the422statusresponse-optional-property-added
- ○
added the optional property
statusto the response with the400statusresponse-optional-property-added
- ○
added the optional property
statusto the response with the403statusresponse-optional-property-added
- ○
added the optional property
statusto the response with the422statusresponse-optional-property-added
- ○
added the optional property
titleto the response with the400statusresponse-optional-property-added
- ○
added the optional property
titleto the response with the403statusresponse-optional-property-added
- ○
added the optional property
titleto the response with the422statusresponse-optional-property-added
- ○
added the optional property
typeto the response with the400statusresponse-optional-property-added
- ○
added the optional property
typeto the response with the403statusresponse-optional-property-added
- ○
added the optional property
typeto the response with the422statusresponse-optional-property-added
This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ▲
added the new required
queryrequest parameterproject_idnew-required-request-parameter
- ●
deleted the
queryrequest parameterlimitrequest-parameter-removed
- ●
deleted the
queryrequest parameterselectrequest-parameter-removed
- ●
deleted the
queryrequest parametersession_idrequest-parameter-removed
- ○
added the new optional
queryrequest parameterpage_sizenew-optional-request-parameter
- ○
added the new optional
queryrequest parameterselectsnew-optional-request-parameter
- ○
added the optional property
has_moreto the response with the200statusresponse-optional-property-added
- ○
added the optional property
itemsto the response with the200statusresponse-optional-property-added
- ○
added the optional property
next_cursorto the response with the200statusresponse-optional-property-added
This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲