List Spans

Retrieves a list of spans from your Confident AI project.

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Query parameters

pageintegerOptional>=1
This specifies the page number of the threads to return. Defaulted to 1.
pageSizeintegerOptional>=1
This specifies the maximum number of threads per page. Defaulted to 25.
typeenumOptional
Filter by the specific type of span.
Allowed values:
traceUuidstringOptionalformat: "uuid"
Filter spans that belong to a specific trace UUID.
namestringOptional
Filter spans by their exact name.
hasErrorbooleanOptional

Filter for spans that either failed (true) or succeeded (false).

modelstringOptional

Filter LLM spans by the model used (e.g., ‘gpt-4’).

promptAliasstringOptional
This filters the spans by the prompt alias used.
promptCommitHashstringOptional
This filters the spans by the exact prompt commit hash used.
promptVersionstringOptional
This filters the spans by the prompt version used.
promptLabelstringOptional
This filters the spans by the prompt label used.
embedderstringOptional
Filter retriever spans by the embedder model used.
topKintegerOptional>=0
Filter retriever spans by the topK value.
chunkSizeintegerOptional>=0
Filter retriever spans by the chunk size.
environmentstringOptional
This filters the threads by the environment where the thread was created, and returns threads from all environments if not specified.
startstringOptionalformat: "date-time"
This filters for threads created after the specified start datetime. Defaulted to 30 days ago.
endstringOptionalformat: "date-time"
This filters for threads created before the specified end datetime. Defaulted to the current time.
sortByenumOptional

This determines the field to sort by. Defaulted to lastActivity.

Allowed values:
ascendingenumOptional

This determines if the field specified in sortBy should be in ascending order. Defaults to false.

Allowed values:

Response

successboolean
This is true if the spans were successfully retrieved.
dataobject
The payload containing the paginated spans and total count.
deprecatedboolean
This is true if this endpoint is deprecated.