{ "opencollection": "1.0.0", "info": { "name": "langfuse AnnotationQueues Observations API", "version": "1.0" }, "items": [ { "info": { "name": "Observations", "type": "folder" }, "items": [ { "info": { "name": "observations_getMany", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/public/v2/observations", "params": [ { "name": "fields", "value": "", "type": "query", "description": "Comma-separated list of field groups to include in the response.\nAvailable groups: core, basic, time, io, metadata, model, usage, prompt, metrics.\nIf not specified, `core` and `basic` field groups are returned.\nExample: \"basic,usage,model\"" }, { "name": "expandMetadata", "value": "", "type": "query", "description": "Comma-separated list of metadata keys to return non-truncated.\nBy default, metadata values over 200 characters are truncated.\nUse this parameter to retrieve full values for specific keys.\nExample: \"key1,key2\"" }, { "name": "limit", "value": "", "type": "query", "description": "Number of items to return per page. Maximum 1000, default 50." }, { "name": "cursor", "value": "", "type": "query", "description": "Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page." }, { "name": "parseIoAsJson", "value": "", "type": "query", "description": "**Deprecated.** Setting this to `true` will return a 400 error.\nInput/output fields are always returned as raw strings.\nRemove this parameter or set it to `false`." }, { "name": "name", "value": "", "type": "query" }, { "name": "userId", "value": "", "type": "query" }, { "name": "type", "value": "", "type": "query", "description": "Filter by observation type (e.g., \"GENERATION\", \"SPAN\", \"EVENT\", \"AGENT\", \"TOOL\", \"CHAIN\", \"RETRIEVER\", \"EVALUATOR\", \"EMBEDDING\", \"GUARDRAIL\")" }, { "name": "traceId", "value": "", "type": "query" }, { "name": "level", "value": "", "type": "query", "description": "Optional filter for observations with a specific level (e.g. \"DEBUG\", \"DEFAULT\", \"WARNING\", \"ERROR\")." }, { "name": "parentObservationId", "value": "", "type": "query" }, { "name": "environment", "value": "", "type": "query", "description": "Optional filter for observations where the environment is one of the provided values." }, { "name": "fromStartTime", "value": "", "type": "query", "description": "Retrieve only observations with a start_time on or after this datetime (ISO 8601)." }, { "name": "toStartTime", "value": "", "type": "query", "description": "Retrieve only observations with a start_time before this datetime (ISO 8601)." }, { "name": "version", "value": "", "type": "query", "description": "Optional filter to only include observations with a certain version." }, { "name": "filter", "value": "", "type": "query", "description": "JSON string containing an array of filter conditions. When provided, this takes precedence over query parameter filters (userId, name, type, level, environment, fromStartTime, ...).\n\n## Filter Structure\nEach filter condition has the following structure:\n```json\n[\n {\n \"type\": string, // Required. One of: \"datetime\", \"string\", \"number\", \"stringOptions\", \"categoryOptions\", \"arrayOptions\", \"stringObject\", \"numberObject\", \"boolean\", \"null\"\n \"column\": string, // Required. Column to filter on (see available columns below)\n \"operator\": string, // Required. Operator based on type:\n // - datetime: \">\", \"<\", \">=\", \"<=\"\n // - string: \"=\", \"contains\", \"does not contain\", \"starts with\", \"ends with\"\n // - stringOptions: \"any of\", \"none of\"\n // - categoryOptions: \"any of\", \"none of\"\n // - arrayOptions: \"any of\", \"none of\", \"all of\"\n // - number: \"=\", \">\", \"<\", \">=\", \"<=\"\n // - stringObject: \"=\", \"contains\", \"does not contain\", \"starts with\", \"ends with\"\n // - numberObject: \"=\", \">\", \"<\", \">=\", \"<=\"\n // - boolean: \"=\", \"<>\"\n // - null: \"is null\", \"is not null\"\n \"value\": any, // Required (except for null type). Value to compare against. Type depends on filter type\n \"key\": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata\n }\n]\n```\n\n## Available Columns\n\n### Core Observation Fields\n- `id` (string) - Observation ID\n- `type` (string) - Observation type (SPAN, GENERATION, EVENT)\n- `name` (string) - Observation name\n- `traceId` (string) - Associated trace ID\n- `startTime` (datetime) - Observation start time\n- `endTime` (datetime) - Observation end time\n- `environment` (string) - Environment tag\n- `level` (string) - Log level (DEBUG, DEFAULT, WARNING, ERROR)\n- `statusMessage` (string) - Status message\n- `version` (string) - Version tag\n- `userId` (string) - User ID\n- `sessionId` (string) - Session ID\n\n### Trace-Related Fields\n- `traceName` (string) - Name of the parent trace\n- `traceTags` (arrayOptions) - Tags from the parent trace\n- `tags` (arrayOptions) - Alias for traceTags\n\n### Performance Metrics\n- `latency` (number) - Latency in seconds (calculated: end_time - start_time)\n- `timeToFirstToken` (number) - Time to first token in seconds\n- `tokensPerSecond` (number) - Output tokens per second\n\n### Token Usage\n- `inputTokens` (number) - Number of input tokens\n- `outputTokens` (number) - Number of output tokens\n- `totalTokens` (number) - Total tokens (alias: `tokens`)\n\n### Cost Metrics\n- `inputCost` (number) - Input cost in USD\n- `outputCost` (number) - Output cost in USD\n- `totalCost` (number) - Total cost in USD\n\n### Model Information\n- `model` (string) - Provided model name (alias: `providedModelName`)\n- `promptName` (string) - Associated prompt name\n- `promptVersion` (number) - Associated prompt version\n\n### Structured Data\n- `metadata` (stringObject/numberObject/categoryOptions) - Metadata key-value pairs. Use `key` parameter to filter on specific metadata keys.\n\n## Filter Examples\n```json\n[\n {\n \"type\": \"string\",\n \"column\": \"type\",\n \"operator\": \"=\",\n \"value\": \"GENERATION\"\n },\n {\n \"type\": \"number\",\n \"column\": \"latency\",\n \"operator\": \">=\",\n \"value\": 2.5\n },\n {\n \"type\": \"stringObject\",\n \"column\": \"metadata\",\n \"key\": \"environment\",\n \"operator\": \"=\",\n \"value\": \"production\"\n }\n]\n```" } ], "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "docs": "Get a list of observations with cursor-based pagination and flexible field selection.\n\n## Cursor-based Pagination\nThis endpoint uses cursor-based pagination for efficient traversal of large datasets.\nThe cursor is returned in the response metadata and should be passed in subsequent requests\nto retrieve the next page of results.\n\n## Field Selection\nUse the `fields` parameter to control which observation fields are returned:\n- `core` - Always included: id, traceId, startTime, endTime, projectId, p" } ] } ], "bundled": true }