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

# List metric thresholds

> Retrieve all thresholds for a specific metric.



## OpenAPI

````yaml /api-reference/v1/metrics-v1.yaml get /metrics/{metric_id}/thresholds
openapi: 3.0.3
info:
  title: Coval Metrics API
  version: 1.0.0
  description: |
    Manage custom evaluation metrics for agent testing and monitoring.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Metrics
    description: CRUD operations for custom evaluation metrics
paths:
  /metrics/{metric_id}/thresholds:
    get:
      tags:
        - Metrics
      summary: List metric thresholds
      description: Retrieve all thresholds for a specific metric.
      operationId: listMetricThresholds
      parameters:
        - name: metric_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9]{22}$
          description: 22-character metric ID
        - name: page_size
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: Maximum results per page
        - name: page_token
          in: query
          schema:
            type: string
          description: Pagination token from previous response
      responses:
        '200':
          description: Thresholds retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListThresholdsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ListThresholdsResponse:
      type: object
      required:
        - thresholds
      properties:
        thresholds:
          type: array
          items:
            $ref: '#/components/schemas/MetricThresholdResource'
        next_page_token:
          type: string
          nullable: true
    MetricThresholdResource:
      type: object
      description: Org-specific threshold for a metric
      properties:
        name:
          type: string
          description: 'Resource name: "metrics/{metric_id}/threshold"'
          example: metrics/abc123def456ghi789jklm/threshold
        comparison_operator:
          allOf:
            - $ref: '#/components/schemas/ComparisonOperator'
          nullable: true
        target_float_upper:
          type: number
          nullable: true
          description: Target float value (upper bound for bt/nbt, single value for others)
          example: 0.8
        target_float_lower:
          type: number
          nullable: true
          description: Lower bound for range operators (bt/nbt)
        target_values:
          type: array
          nullable: true
          items:
            type: string
          description: Target values for list operators (in/nin)
        source:
          allOf:
            - $ref: '#/components/schemas/ThresholdSource'
          nullable: true
        create_time:
          type: string
          format: date-time
          nullable: true
        update_time:
          type: string
          format: date-time
          nullable: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - PERMISSION_DENIED
                - NOT_FOUND
                - ALREADY_EXISTS
                - INTERNAL
            message:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                  description:
                    type: string
    ComparisonOperator:
      type: string
      description: Comparison operator for thresholds
      enum:
        - eq
        - neq
        - gt
        - gte
        - lt
        - lte
        - in
        - nin
        - bt
        - nbt
    ThresholdSource:
      type: string
      description: Source of the threshold value
      enum:
        - manual
        - model
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Metric not found
              details:
                - field: metric_id
                  description: No metric found with this ID
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````