> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List metrics

> List metrics, each once, with the id of its active revision and no revision inline. The list holds the metrics of the caller's organization and the Galtea metrics. An admin names another organization with `organizationId`. A caller limited to the products its user groups grant also sees only the metrics those products use, and the Galtea metrics. The active revision carries its agreement with human annotations and its annotation and evaluation counts, over the evaluations of the products the caller reads. A Galtea metric counts only the caller's organization, or the one an admin names. See [Metrics](https://docs.galtea.ai/concepts/metric).

> [!WARNING]
>
> You are reading the docs of Galtea 5.24. [Read this page in the latest version](https://docs.galtea.ai/api-reference/metrics-v2/list-metrics.md).


## OpenAPI

````yaml /v5.24/openapi.json get /v2/metrics
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /v2/metrics:
    get:
      tags:
        - metrics-v2
      summary: List metrics
      description: >-
        List metrics, each once, with the id of its active revision and no
        revision inline. The list holds the metrics of the caller's organization
        and the Galtea metrics. An admin names another organization with
        `organizationId`. A caller limited to the products its user groups grant
        also sees only the metrics those products use, and the Galtea metrics.
        The active revision carries its agreement with human annotations and its
        annotation and evaluation counts, over the evaluations of the products
        the caller reads. A Galtea metric counts only the caller's organization,
        or the one an admin names. See
        [Metrics](https://docs.galtea.ai/concepts/metric).
      operationId: listMetricsV2
      parameters:
        - schema:
            type: array
            items:
              type: string
            description: Filter by metric IDs
          required: false
          description: Filter by metric IDs
          style: form
          explode: true
          name: ids
          in: query
        - schema:
            type: string
            description: Filter by metric name (partial match, case insensitive)
          required: false
          description: Filter by metric name (partial match, case insensitive)
          name: name
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by metric names (exact match, case insensitive, multiple)
          required: false
          description: Filter by metric names (exact match, case insensitive, multiple)
          style: form
          explode: true
          name: names
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by tags; a metric matches when it holds one of them
          required: false
          description: Filter by tags; a metric matches when it holds one of them
          style: form
          explode: true
          name: tags
          in: query
        - schema:
            type: array
            items:
              type: string
              enum:
                - SELF_HOSTED
                - FULL_PROMPT
                - PARTIAL_PROMPT
                - HUMAN_EVALUATION
                - GEVAL
                - DEEPEVAL
                - DETERMINISTIC
                - DECISION
                - CLASSIFIER
            description: >-
              Filter by metric sources. `CLASSIFIER` is the deprecated name of
              `DECISION`, accepted until 2028-01-17.
            x-deprecated-values:
              - value: CLASSIFIER
                x-sunset: '2028-01-17'
                x-replacement: DECISION
          required: false
          description: >-
            Filter by metric sources. `CLASSIFIER` is the deprecated name of
            `DECISION`, accepted until 2028-01-17.
          style: form
          explode: true
          x-deprecated-values:
            - value: CLASSIFIER
              x-sunset: '2028-01-17'
              x-replacement: DECISION
          name: sources
          in: query
        - schema:
            type: boolean
            description: >-
              Also list the metrics whose active revision is excluded from
              analytics. Defaults to false. A metric named in `ids` is listed
              either way.
          required: false
          description: >-
            Also list the metrics whose active revision is excluded from
            analytics. Defaults to false. A metric named in `ids` is listed
            either way.
          name: includeExcludedFromAnalytics
          in: query
        - schema:
            type: string
            description: Filter by metric description (partial match, case insensitive)
          required: false
          description: Filter by metric description (partial match, case insensitive)
          name: description
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Filter metrics created at or after this timestamp (ISO 8601
              format)
          required: false
          description: Filter metrics created at or after this timestamp (ISO 8601 format)
          name: fromCreatedAt
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Filter metrics created at or before this timestamp (ISO 8601
              format)
          required: false
          description: Filter metrics created at or before this timestamp (ISO 8601 format)
          name: toCreatedAt
          in: query
        - schema:
            type: boolean
            description: >-
              List the metrics of the caller's organization. When this or
              `includeDefaultEntities` is true, the list holds only the kinds
              set to true; when neither is, it holds both.
          required: false
          description: >-
            List the metrics of the caller's organization. When this or
            `includeDefaultEntities` is true, the list holds only the kinds set
            to true; when neither is, it holds both.
          name: includeOwnEntities
          in: query
        - schema:
            type: boolean
            description: >-
              List the Galtea metrics. When this or `includeOwnEntities` is
              true, the list holds only the kinds set to true; when neither is,
              it holds both.
          required: false
          description: >-
            List the Galtea metrics. When this or `includeOwnEntities` is true,
            the list holds only the kinds set to true; when neither is, it holds
            both.
          name: includeDefaultEntities
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by user groups; a metric matches when one of them links it
          required: false
          description: Filter by user groups; a metric matches when one of them links it
          style: form
          explode: true
          name: userGroupIds
          in: query
        - schema:
            type: array
            items:
              type: string
            description: >-
              Sort instructions (field and direction pairs). The fields are
              `name`, `createdAt`, and the active revision's `agreement` and
              `annotationCount`. Sorted by `agreement`, a metric with no
              agreement comes last in both directions. Sorted by `agreement` or
              `annotationCount`, a metric with no active revision comes last in
              both directions.
          required: false
          description: >-
            Sort instructions (field and direction pairs). The fields are
            `name`, `createdAt`, and the active revision's `agreement` and
            `annotationCount`. Sorted by `agreement`, a metric with no agreement
            comes last in both directions. Sorted by `agreement` or
            `annotationCount`, a metric with no active revision comes last in
            both directions.
          style: form
          explode: true
          name: sort
          in: query
        - schema:
            type: integer
            minimum: 0
            maximum: 9007199254740991
            default: 10000
            description: Maximum number of results
          required: false
          description: Maximum number of results
          name: limit
          in: query
        - schema:
            type: integer
            minimum: 0
            default: 0
            description: Number of results to skip
          required: false
          description: Number of results to skip
          name: offset
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              List the metrics of this organization and the Galtea metrics,
              instead of the caller's organization. Only a caller who may read
              another organization (ADMIN, ADMIN_READER) names one; any other
              caller answers 403. Cannot be combined with allOrganizations.
          required: false
          description: >-
            List the metrics of this organization and the Galtea metrics,
            instead of the caller's organization. Only a caller who may read
            another organization (ADMIN, ADMIN_READER) names one; any other
            caller answers 403. Cannot be combined with allOrganizations.
          name: organizationId
          in: query
      responses:
        '200':
          description: Metrics retrieved successfully
          headers:
            Content-Range:
              schema:
                type: string
                description: Pagination range as `metrics <offset>-<upperBound>/<total>`.
              required: true
              description: Pagination range as `metrics <offset>-<upperBound>/<total>`.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricV2'
        '400':
          description: >-
            Invalid query parameter, including an unknown source, sort field or
            sort direction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            No user group of the caller lists metric.read, or `organizationId`
            names another organization and the caller may not read it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: A metric in `ids` is not found or out of the caller scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    MetricV2:
      type: object
      properties:
        id:
          type: string
          example: metric_123
          description: Metric ID.
        organizationId:
          type: string
          nullable: true
          example: org_123
          description: The organization of the metric. Null for a Galtea metric.
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: Accuracy
          description: Metric name, unique in its organization.
        description:
          type: string
          nullable: true
          example: Measures the accuracy of responses
        tags:
          type: array
          items:
            type: string
          example:
            - accuracy
            - quality
        documentationUrl:
          type: string
          nullable: true
          example: https://docs.example.com/metrics/accuracy
        source:
          type: string
          nullable: true
          enum:
            - SELF_HOSTED
            - FULL_PROMPT
            - PARTIAL_PROMPT
            - HUMAN_EVALUATION
            - GEVAL
            - DEEPEVAL
            - DETERMINISTIC
            - DECISION
          example: PARTIAL_PROMPT
          description: >-
            Evaluation method for the metric. `FULL_PROMPT` is deprecated for
            creation — `POST /metrics` rejects it with a 400. Use
            `PARTIAL_PROMPT` for new AI Evaluation metrics. The value remains in
            the enum because existing FULL_PROMPT metrics are still returned by
            reads and filters. `DECISION` is the decision model, accepted only
            where the deployment enables it.
        activeRevisionId:
          type: string
          nullable: true
          readOnly: true
          example: revision_123
          description: >-
            The revision that evaluations of this metric run. Null when no
            revision is active.
        activeRevision:
          allOf:
            - $ref: '#/components/schemas/MetricV2ActiveRevision'
            - nullable: true
              readOnly: true
              description: >-
                The label, judge settings, dates and judge figures of the active
                revision, so a list shows them without reading each revision.
                Null when no revision is active.
        createdAt:
          type: string
          format: date-time
        disabledAt:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: >-
            The metric's own disabled date. It ignores the evaluator model of
            each revision: read a revision for that.
      required:
        - id
        - organizationId
        - userId
        - name
        - description
        - tags
        - documentationUrl
        - source
        - activeRevisionId
        - activeRevision
        - createdAt
        - disabledAt
    Error:
      type: object
      properties:
        error:
          type: string
          example: NotFound
          description: >-
            The HTTP status name in PascalCase, such as `BadRequest` or
            `NotFound`.
        message:
          type: string
          example: Product not found
          description: What went wrong, for a person.
      required:
        - error
        - message
    MetricV2ActiveRevision:
      type: object
      properties:
        id:
          type: string
          example: revision_123
          description: Revision ID.
        number:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          example: 3
          description: >-
            The revision number within its metric. The revision shows as "R"
            followed by it, so 3 is "R3".
        name:
          type: string
          nullable: true
          example: Stricter rubric
          description: The revision's own name, or null when it has none.
        evaluatorModelName:
          type: string
          nullable: true
          example: gpt-4
        evaluationParams:
          type: array
          items:
            type: string
          example:
            - input
            - actual_output
            - expected_output
          description: >-
            Ordered list of trace fields the evaluator needs, written in
            snake_case (e.g. `input`, `actual_output`, `expected_output`,
            `retrieval_context`). Determines which data the evaluation engine
            extracts from each trace. Full list of accepted values:
            https://docs.galtea.ai/concepts/metric/evaluation-parameters
        disabledAt:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: >-
            Earliest non-null of the metric's disabled date and this revision's
            evaluator model's `disabledAt`.
        optimizationStatus:
          type: string
          nullable: true
          enum:
            - OPTIMIZING
            - READY_FOR_REVIEW
            - FAILED
            - NO_IMPROVEMENT
            - DECLINED
            - ACTIVATED
          readOnly: true
          example: READY_FOR_REVIEW
          description: >-
            Where an optimization attempt stands. Null for a metric that did not
            come from an optimization. A candidate waiting for review is legacy
            until it is activated.
        excludedFromAnalyticsAt:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: >-
            When this revision was excluded from analytics. Null when its
            results still count. The other revisions of the metric are
            unaffected.
        agreement:
          type: number
          nullable: true
          minimum: 0
          maximum: 100
          example: 87.5
          description: >-
            How close the judge's scores are to the human annotations, in
            percent: 100 minus the average distance between the two scores,
            where "Partially correct" is 0.5. Higher is better. Null below
            `minAnnotationsForAgreement` annotated evaluations, and for a Human
            Evaluation metric, which has no judge.
        annotationCount:
          type: integer
          minimum: 0
          example: 24
          description: >-
            Evaluations of this revision that carry both the judge's score and a
            human annotation, on the products the caller reads. An annotation
            counts for every revision of its metric that judged the same case.
        evaluationCount:
          type: integer
          minimum: 0
          example: 310
          description: >-
            Successful evaluations of this revision, annotated or not, on the
            products the caller reads.
        minAnnotationsForAgreement:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          example: 10
          description: The fewest annotated evaluations that show an `agreement`.
      required:
        - id
        - number
        - name
        - evaluatorModelName
        - evaluationParams
        - disabledAt
        - optimizationStatus
        - excludedFromAnalyticsAt
        - agreement
        - annotationCount
        - evaluationCount
        - minAnnotationsForAgreement
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.