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

> List metric flows — a follow-up metric triggered by a trigger metric's result.
Scoped to the workspace named by the `X-Coval-Workspace-Id` header when present.




## OpenAPI

````yaml /api-reference/v1/metrics-v1.yaml get /metrics/flows
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/flows:
    get:
      tags:
        - Metrics
      summary: List metric flows
      description: >
        List metric flows — a follow-up metric triggered by a trigger metric's
        result.

        Scoped to the workspace named by the `X-Coval-Workspace-Id` header when
        present.
      operationId: listMetricFlows
      parameters:
        - name: page_size
          in: query
          required: false
          description: Number of results per page (1-100, default 50).
          schema:
            type: integer
        - name: page_token
          in: query
          required: false
          description: Pagination token from a previous response's `next_page_token`.
          schema:
            type: string
        - name: order_by
          in: query
          required: false
          description: >
            Sort field, optionally prefixed with `-` for descending. One of
            `created_at`,

            `status`, `trigger_metric_name`, `followup_metric_name`. Defaults to
            `-created_at`.
          schema:
            type: string
        - name: status_filter
          in: query
          required: false
          description: Restrict to a single status.
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
        - name: search_query
          in: query
          required: false
          description: Case-insensitive match against trigger/followup metric names.
          schema:
            type: string
      responses:
        '200':
          description: A page of metric flows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMetricFlowsResponse'
        '400':
          description: Invalid pagination or sort parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ListMetricFlowsResponse:
      type: object
      required:
        - metric_flows
      properties:
        metric_flows:
          type: array
          items:
            $ref: '#/components/schemas/MetricFlowResource'
        next_page_token:
          type: string
          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
    MetricFlowResource:
      type: object
      required:
        - name
        - id
        - trigger_metric_id
        - followup_metric_id
        - status
      properties:
        name:
          type: string
          description: 'Resource name. Format: "metrics/flows/{id}".'
        id:
          type: string
        create_time:
          type: string
          format: date-time
          nullable: true
        trigger_metric_id:
          type: string
        followup_metric_id:
          type: string
        trigger_criteria:
          type: object
          additionalProperties: true
          nullable: true
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - DELETED
        trigger_metric_name:
          type: string
          nullable: true
        trigger_metric_display_name:
          type: string
          nullable: true
        followup_metric_name:
          type: string
          nullable: true
        followup_metric_display_name:
          type: string
          nullable: true
  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
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
    ServiceUnavailable:
      description: Service temporarily unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Service temporarily unavailable
              details:
                - description: Database routing is temporarily unavailable. Please retry.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````