> ## 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 linked metrics

> Get all metrics linked to a specification. See [Specifications](https://docs.galtea.ai/concepts/product/specification).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /specifications/{id}/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:
  /specifications/{id}/metrics:
    get:
      tags:
        - specifications
      summary: Get linked metrics
      description: >-
        Get all metrics linked to a specification. See
        [Specifications](https://docs.galtea.ai/concepts/product/specification).
      operationId: getSpecificationMetrics
      parameters:
        - name: id
          in: path
          description: Specification ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Metrics retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Metric'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Specification not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Metric:
      type: object
      properties:
        id:
          type: string
          example: metric_123
        metricGroupId:
          type: string
          readOnly: true
          example: metric_123
          description: >-
            Identifier shared by every metric in the same revision family.
            Server-managed — derived from `parentMetricId` on create (or
            generated for roots). Cannot be set by the caller.
        parentMetricId:
          type: string
          nullable: true
          example: metric_122
          description: >-
            Id of the direct parent metric. On create, providing this value
            turns the new metric into a revision: it joins the parent's family
            and (if the parent is active) flips the parent to legacy. Omit or
            null to create a root metric in a fresh group. On responses, this is
            the recorded parent edge (null for roots).
        organizationId:
          type: string
          nullable: true
          example: org_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: Accuracy
        evaluationParams:
          type: array
          items:
            type: string
          example:
            - input
            - actualOutput
            - expectedOutput
          description: >-
            Ordered list of inference-result fields the evaluator needs (e.g.
            input, actualOutput, expectedOutput, retrievalContext). Determines
            which data the evaluation engine extracts from each inference
            result.
        source:
          type: string
          enum:
            - SELF_HOSTED
            - FULL_PROMPT
            - PARTIAL_PROMPT
            - HUMAN_EVALUATION
            - GEVAL
            - DEEPEVAL
            - DETERMINISTIC
          nullable: true
          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.
        judgePrompt:
          type: string
          nullable: true
          example: Evaluate the accuracy of the response
        tags:
          type: array
          items:
            type: string
          example:
            - accuracy
            - quality
        description:
          type: string
          nullable: true
          example: Measures the accuracy of responses
        documentationUrl:
          type: string
          nullable: true
          example: https://docs.example.com/metrics/accuracy
        evaluatorModelName:
          type: string
          nullable: true
          example: GPT-4
        areEvalParamsTop:
          type: boolean
          nullable: true
          description: >-
            When true, evaluationParams are injected at the top level of the
            evaluator prompt instead of nested inside the conversation context.
        isBeingOptimized:
          type: boolean
          readOnly: true
          description: Whether the metric is currently being optimized.
        specificationIds:
          type: array
          items:
            type: string
          example:
            - spec_123
        userGroupIds:
          type: array
          items:
            type: string
          example:
            - ug_123
        createdAt:
          type: string
          format: date-time
        legacyAt:
          type: string
          format: date-time
          nullable: true
        disabledAt:
          type: string
          format: date-time
          nullable: true
    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-...`.

````