---
title: "Query Metrics"
method: POST
path: "/v2/projects/{project_id}/metrics/search"
tags: ["trace"]
---

# Query Metrics

`POST /v2/projects/{project_id}/metrics/search`

## Path parameters

- `project_id` string, uuid4, required

## Request body

- LogRecordsMetricsQueryRequest
  - `log_stream_id` string, uuid4, nullable — Log stream id associated with the traces.
  - `experiment_id` string, uuid4, nullable — Experiment id associated with the traces.
  - `metrics_testing_id` string, uuid4, nullable — Metrics testing id associated with the traces.
  - `filters` union[]
    - union
      - LogRecordsIDFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'one_of' | 'not_in' | 'contains'
        - `value` union, required
          - string, uuid4
          - union[]
            - union
              - …
          - string
        - `type` 'id'
      - LogRecordsDateFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte', required
        - `value` string, date-time, required
        - `type` 'date'
      - LogRecordsNumberFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between', required
        - `value` union, required
          - integer
          - number
          - integer[]
          - number[]
        - `type` 'number'
      - LogRecordsBooleanFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne'
        - `value` boolean, required
        - `type` 'boolean'
      - LogRecordsCollectionFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'contains' | 'one_of' | 'not_in', required
        - `value` union, required
          - string
          - string[]
        - `case_sensitive` boolean
        - `type` 'collection'
      - LogRecordsTextFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'contains' | 'one_of' | 'not_in', required
        - `value` union, required
          - string
          - string[]
        - `case_sensitive` boolean
        - `type` 'text'
      - LogRecordsFullyAnnotatedFilter — Queue-scoped filter for records rated across all queue templates.
        - `column_id` 'fully_annotated' — Queue-scoped filter identifier. This filter only works for annotation-queue searches that provide queue context.
        - `type` 'fully_annotated'
        - `user_ids` string[], nullable — Optional queue member IDs to require for full annotation in a queue-scoped search. If omitted, all tracked queue members visible to the requester are used.
  - `start_time` string, date-time, required — Include traces from this time onward.
  - `end_time` string, date-time, required — Include traces up to this time.
  - `interval` integer
  - `group_by` string, nullable

## Response `200`

Successful Response

- LogRecordsMetricsResponse
  - `group_by_columns` string[], required
  - `aggregate_metrics` object, required
  - `bucketed_metrics` object, required
  - `ems_captured_error` boolean — Whether any EMS error codes were encountered in the queried metrics
  - `standard_errors` object, nullable — Structured EMS errors for each error code encountered, keyed by code

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.net/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/versions/933e8c8e6366/schema)
