Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Get span stats

GET/v1/private/spans/statsGet span stats

Get span stats

Parameters

project_idstring · uuidquery
project_namestringquery
trace_idstring · uuidquery
typestringquery

one of "general", "tool", "llm", "guardrail"

one of "general", "tool", "llm", "guardrail"

filtersstringquery
searchstringquery

Full-text search across span fields

from_timestring · date-timequery

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

to_timestring · date-timequery

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

Responses

200Span stats resourceapplication/json
objectProjectStats_Public
statsarray of object
Show child attributes
Show array items
namestring
typestring

one of "COUNT", "PERCENTAGE", "AVG"

Example response
{
  "stats": [
    {
      "name": "string",
      "type": "AVG"
    }
  ]
}
Documentation menu