OptionalenvironmentOptional filter for observations where the environment is one of the provided values.
OptionalfilterJSON string containing an array of filter conditions. When provided, this takes precedence over query parameter filters (userId, name, type, level, environment, fromStartTime, ...).
Each filter condition has the following structure:
[
{
"type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "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"
// - stringOptions: "any of", "none of"
// - categoryOptions: "any of", "none of"
// - arrayOptions: "any of", "none of", "all of"
// - number: "=", ">", "<", ">=", "<="
// - stringObject: "=", "contains", "does not contain", "starts with", "ends with"
// - numberObject: "=", ">", "<", ">=", "<="
// - boolean: "=", "<>"
// - null: "is null", "is not null"
"value": any, // Required (except for null type). Value to compare against. Type depends on filter type
"key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata
}
]
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 taglatency (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 namepromptName (string) - Associated prompt namepromptVersion (number) - Associated prompt versionmetadata (stringObject/numberObject/categoryOptions) - Metadata key-value pairs. Use key parameter to filter on specific metadata keys.scores_avg (number) - Average of numeric scores (alias: scores)score_categories (categoryOptions) - Categorical score valuesuserId (string) - User ID from associated tracetraceName (string) - Name from associated tracetraceEnvironment (string) - Environment from associated tracetraceTags (arrayOptions) - Tags from associated trace[
{
"type": "string",
"column": "type",
"operator": "=",
"value": "GENERATION"
},
{
"type": "number",
"column": "latency",
"operator": ">=",
"value": 2.5
},
{
"type": "stringObject",
"column": "metadata",
"key": "environment",
"operator": "=",
"value": "production"
}
]
OptionalfromRetrieve only observations with a start_time on or after this datetime (ISO 8601).
OptionallevelOptional filter for observations with a specific level (e.g. "DEBUG", "DEFAULT", "WARNING", "ERROR").
OptionallimitLimit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit.
OptionalnameOptionalpagePage number, starts at 1.
OptionalparentOptionaltoRetrieve only observations with a start_time before this datetime (ISO 8601).
OptionaltraceOptionaltypeOptionaluserOptionalversionOptional filter to only include observations with a certain version.
Example