> ## 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.

# Get metric by ID

> Get a metric with the id of its active revision. The id is a metric id. A revision id answers 404. See [Metrics](https://docs.galtea.ai/concepts/metric).



## OpenAPI

````yaml /openapi.json get /v2/metrics/{id}
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/{id}:
    get:
      tags:
        - metrics-v2
      summary: Get metric by ID
      description: >-
        Get a metric with the id of its active revision. The id is a metric id.
        A revision id answers 404. See
        [Metrics](https://docs.galtea.ai/concepts/metric).
      operationId: getMetricV2
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Metric ID. A revision ID answers 404; read a revision under
              /v2/revisions.
            example: metric_123
          required: true
          description: >-
            Metric ID. A revision ID answers 404; read a revision under
            /v2/revisions.
          name: id
          in: path
      responses:
        '200':
          description: Metric retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The metric belongs to another organization, none of the products the
            caller's user groups grant uses it, or no user group of the caller
            lists metric.read
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Metric not found
          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
            - CLASSIFIER
          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. `CLASSIFIER` is the Classifier judge, 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.
        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
        - createdAt
        - disabledAt
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  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.