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

# List metric definitions metric definitions

> Requires scopes: eval:read



## OpenAPI

````yaml /api-reference/openapi.json get /api/metric-definitions
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/metric-definitions:
    get:
      tags:
        - metric definitions
      summary: List metric definitions metric definitions
      description: 'Requires scopes: eval:read'
      operationId: get_metric_definitions
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetApiMetricDefinitionsResponse200ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - eval:read
components:
  schemas:
    GetApiMetricDefinitionsResponse200ApplicationJson:
      type: object
      properties:
        metricDefinitions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              organizationId:
                $ref: '#/components/schemas/OrganizationId'
              metricKey:
                type: string
              version:
                type: number
              status:
                type: string
              source:
                type: string
              measure:
                type: string
              aggregation:
                type: string
              filters:
                type: array
                items:
                  type: object
                  properties:
                    operator:
                      oneOf:
                        - type: string
                          enum:
                            - exists
                        - type: string
                          enum:
                            - in
                        - type: string
                          enum:
                            - not_in
                        - type: string
                          enum:
                            - gte
                        - type: string
                          enum:
                            - lte
                        - type: string
                          enum:
                            - eq
                        - type: string
                          enum:
                            - neq
                        - type: string
                          enum:
                            - gt
                        - type: string
                          enum:
                            - lt
                        - type: string
                          enum:
                            - contains
                    field:
                      type: string
                    value:
                      $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                  required:
                    - operator
                    - field
              groupBy:
                type: array
                items:
                  type: string
              timeGrain:
                oneOf:
                  - type: 'null'
                  - type: string
              windowJson:
                oneOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - relative
                      lookbackSeconds:
                        type: number
                      timezone:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - lookbackSeconds
                      - timezone
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - absolute
                      timezone:
                        type: string
                      from:
                        type: string
                      to:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - timezone
                      - from
                      - to
              unknownPolicy:
                type: string
              calibrationBoundary:
                oneOf:
                  - type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - not_applicable
                    additionalProperties: false
                    required:
                      - state
                  - type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - exact
                    additionalProperties: false
                    required:
                      - state
                  - type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - calibrated
                      mappingVersionId:
                        type: string
                    additionalProperties: false
                    required:
                      - state
                      - mappingVersionId
                  - type: object
                    properties:
                      reason:
                        type: string
                      state:
                        type: string
                        enum:
                          - not_comparable
                    additionalProperties: false
                    required:
                      - reason
                      - state
              definitionHash:
                type: string
              parentVersionId:
                oneOf:
                  - type: 'null'
                  - type: string
              createdBy:
                type: string
              createdAt:
                type: string
                format: date-time
              approvedBy:
                oneOf:
                  - type: 'null'
                  - type: string
              approvedAt:
                oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
            additionalProperties: false
            required:
              - id
              - organizationId
              - metricKey
              - version
              - status
              - source
              - measure
              - aggregation
              - filters
              - groupBy
              - timeGrain
              - windowJson
              - unknownPolicy
              - calibrationBoundary
              - definitionHash
              - parentVersionId
              - createdBy
              - createdAt
              - approvedBy
              - approvedAt
        pagination:
          type: object
          properties:
            limit:
              type: number
            offset:
              type: number
          additionalProperties: false
          required:
            - limit
            - offset
      additionalProperties: false
      required:
        - metricDefinitions
        - pagination
    OrganizationId:
      type: string
      format: uuid
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````