{
  "opencollection": "1.0.0",
  "info": {
    "name": "langfuse AnnotationQueues LegacyObservationsV1 API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "LegacyObservationsV1",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "legacy_observationsV1_get",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/public/observations/:observationId",
            "params": [
              {
                "name": "observationId",
                "value": "",
                "type": "path",
                "description": "The unique langfuse identifier of an observation, can be an event, span or generation"
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Get a observation"
        },
        {
          "info": {
            "name": "legacy_observationsV1_getMany",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/public/observations",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page number, starts at 1."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit."
              },
              {
                "name": "name",
                "value": "",
                "type": "query"
              },
              {
                "name": "userId",
                "value": "",
                "type": "query"
              },
              {
                "name": "type",
                "value": "",
                "type": "query"
              },
              {
                "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\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\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### Associated Trace Fields (requires join with traces table)\n- `userId` (string) - User ID from associated trace\n- `traceName` (string) - Name from associated trace\n- `traceEnvironment` (string) - Environment from associated trace\n- `traceTags` (arrayOptions) - Tags from associated trace\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.\n\nConsider using the [v2 observations endpoint](/api-reference#tag/observationsv2/GET/api/public/v2/observations) for cursor-based pagination and field selection."
        }
      ]
    }
  ],
  "bundled": true
}