OptionalcursorBase64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
OptionalenvironmentOptional filter for observations where the environment is one of the provided values.
OptionalexpandComma-separated list of metadata keys to return non-truncated. By default, metadata values over 200 characters are truncated. Use this parameter to retrieve full values for specific keys. Example: "key1,key2"
OptionalfieldsComma-separated list of field groups to include in the response.
Available groups: core, basic, time, io, metadata, model, usage, prompt, metrics, trace_context.
If not specified, core and basic field groups are returned.
Example: "basic,usage,model"
OptionalfilterJSON string containing an array of filter conditions. A condition on the same field as a query parameter filter (userId, name, type, level, environment, fromStartTime, ...) replaces that parameter. Query parameters for other fields still apply. A startTime condition replaces both fromStartTime and toStartTime.
Each filter condition has the following structure:
[
{
"type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "arrayOptions", "stringObject", "boolean", "null"
"column": string, // Required. Column to filter on (see available columns below)
"operator": string, // Required. Operator based on type:
// - datetime: ">", "<", ">=", "<="
// - string: "=", "contains", "does not contain", "starts with", "ends with", "is not empty", "matches" (input/output only)
// - stringOptions: "any of", "none of" (works on any string column except input/output)
// - arrayOptions: "any of", "none of", "all of"
// - number: "=", ">", "<", ">=", "<="
// - stringObject: "=", "contains", "does not contain", "starts with", "ends with", "matches", "is set", "is not set"
// - boolean: "=", "<>"
// - null: "is null", "is not null"
"value": any, // Required. Type depends on filter type: ISO 8601 string for datetime, JSON number for number (not a numeric string), array of strings for stringOptions/arrayOptions, boolean for boolean, and "" (empty string) for null
"key": string // Required only for stringObject (the metadata key to filter on)
}
]
id (string) - Observation IDtype (string) - Observation type (SPAN, GENERATION, EVENT)name (string) - Observation nametraceId (string) - Associated trace IDstartTime (datetime) - Observation start timeendTime (datetime) - Observation end timeenvironment (string) - Environment taglevel (string) - Log level (DEBUG, DEFAULT, WARNING, ERROR)statusMessage (string) - Status messageversion (string) - Version taguserId (string) - User IDsessionId (string) - Session IDisRootObservation (boolean) - Whether the observation is a logical root. Observations marked as app roots by the SDK may retain a non-null parentObservationId.traceName (string) - Name of the parent tracetraceTags (arrayOptions) - Tags from the parent tracetags (arrayOptions) - Alias for traceTagslatency (number) - Latency in seconds (calculated: end_time - start_time)timeToFirstToken (number) - Time to first token in secondstokensPerSecond (number) - Output tokens per secondinputTokens (number) - Number of input tokensoutputTokens (number) - Number of output tokenstotalTokens (number) - Total tokens (alias: tokens)inputCost (number) - Input cost in USDoutputCost (number) - Output cost in USDtotalCost (number) - Total cost in USDmodel (string) - Provided model name (alias: providedModelName)promptName (string) - Associated prompt namepromptVersion (number) - Associated prompt versioninput (string) - Observation input. Supports accelerated indexed literal search with the matches operator.output (string) - Observation output. Supports accelerated indexed literal search with the matches operator.metadata (stringObject) - Metadata key-value pairs. Use the key parameter to filter on a specific metadata key. Metadata values are stored as strings, so match numbers and booleans by their string form with = (for example "value": "true" or "value": "42"); numeric comparisons such as > are not supported on metadata.The matches operator is only supported for input, output, and stringObject metadata filters. It performs indexed literal search with token-boundary pruning using the events table text indexes. Case sensitivity differs by target: input and output matches are case-insensitive, while metadata value matches are case-sensitive. Unlike SQL LIKE, % and _ are treated as literal characters. Use contains for legacy substring semantics where the API allows it. Any v2 input or output filter must be accompanied by at least one = or matches filter on input or output; standalone contains, starts with, ends with, and does not contain filters on these columns are rejected.
[
{
"type": "string",
"column": "type",
"operator": "=",
"value": "GENERATION"
},
{
"type": "number",
"column": "latency",
"operator": ">=",
"value": 2.5
},
{
"type": "stringObject",
"column": "metadata",
"key": "environment",
"operator": "=",
"value": "production"
},
{
"type": "string",
"column": "output",
"operator": "matches",
"value": "needle"
},
{
"type": "boolean",
"column": "isRootObservation",
"operator": "=",
"value": true
}
]
OptionalfromRetrieve only observations with a start_time on or after this datetime (ISO 8601).
OptionalisFilter by whether an observation is a logical root.
Root observations include observations without a physical parent and observations marked as app roots by the SDK.
An app-root observation may have isRootObservation=true and a non-null parentObservationId.
OptionallevelOptional filter for observations with a specific level (e.g. "DEBUG", "DEFAULT", "WARNING", "ERROR").
OptionallimitMaximum number of items to return per page. A page may contain fewer items, including zero items, while meta.cursor is present. Maximum 1000, default 50.
OptionalnameOptionalparentFilter by the physical parent observation ID.
An empty value matches only observations without a physical parent. Use isRootObservation to include observations marked as app roots by the SDK, which may retain a non-null parentObservationId.
OptionalparseDeprecated. Setting this to true will return a 400 error.
Input/output fields are always returned as raw strings.
Remove this parameter or set it to false.
OptionalsessionFilter by session ID.
OptionaltoRetrieve only observations with a start_time before this datetime (ISO 8601).
OptionaltraceOptionaltypeFilter by observation type (e.g., "GENERATION", "SPAN", "EVENT", "AGENT", "TOOL", "CHAIN", "RETRIEVER", "EVALUATOR", "EMBEDDING", "GUARDRAIL")
OptionaluserOptionalversionOptional filter to only include observations with a certain version.
Example