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

# Run a metric evaluation by the run_metric path (deprecated)

> Deprecated. Use `POST /v1/projects/{project_id}/metrics/run` with a data plane API key instead.



## OpenAPI

````yaml https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/data_plane_openapi.yaml post /v1/metrics/run_metric
openapi: 3.1.0
info:
  title: HoneyHive Data Plane API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.21.0
servers:
  - url: https://api.dp1.us.honeyhive.ai
security: []
tags:
  - name: Charts
    description: >
      Define and manage saved charts. Charts are visualizations that aggregate
      metrics over time with bucketing, filters, and groupings.
  - name: Configurations
    description: >
      Manage prompt configurations, i.e. model parameters, message templates,
      and response settings that can be versioned and deployed without code
      changes.
  - name: Data Plane Api Keys
    description: >
      Create fine-grained data plane API keys for a project from a provisioning
      flow, using an organization-rooted key that is permitted to create keys.
  - name: Datapoints
    description: >
      Manage individual records inside datasets, including batch creation and
      mapping to source events.
  - name: Datasets
    description: >
      Curate collections of datapoints used as test sets for evaluations and
      experiments.
  - name: Evaluators
    description: >
      Manage project-scoped evaluator definitions, immutable versions,
      publication and archival. Requires a fine-grained data plane API key.
  - name: Events
    description: >
      Read and write trace events. Events are the spans that capture every step
      of an AI application's execution.
  - name: Experiments
    description: >
      Run, retrieve, and compare evaluation runs to measure how prompt or
      configuration changes affect agent performance.
  - name: Ingestion Api Keys
    description: >
      Create ingestion API keys for a project from a provisioning flow, using an
      organization-rooted data plane key that is permitted to create keys. An
      ingestion key is the credential an application sends traces with.
  - name: Metric Versions
    description: >
      Snapshot, list, and deploy versions of a metric's definition so changes
      can be reviewed and rolled back without losing history.
  - name: Metrics
    description: >
      Define and run evaluators, i.e. automated quality checks that score traces
      against criteria like accuracy, safety, or correctness.
  - name: Queues
    description: >
      Manage annotation queues for human review of traces, turning expert
      feedback into labeled datasets.
  - name: Sessions
    description: >
      Group related trace events into sessions, the top-level container for a
      multi-step or multi-service AI interaction.
paths:
  /v1/metrics/run_metric:
    post:
      tags:
        - Metrics
      summary: Run a metric evaluation by the run_metric path (deprecated)
      description: >-
        Deprecated. Use `POST /v1/projects/{project_id}/metrics/run` with a data
        plane API key instead.
      operationId: runMetricRunMetricPathLegacy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LegacyRunMetricRequest'
      responses:
        '200':
          description: Metric evaluation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunMetricResponse'
        '400':
          description: >-
            Bad request. Either the request body failed validation (malformed
            metric or event), or the metric could not be evaluated because the
            request was deficient before any compute ran (missing ground truth,
            invalid metric config). The error `message` describes the specific
            cause.
        '422':
          description: >-
            Could not process content. A compute request was dispatched but
            evaluation failed (e.g. `execution_error`, `template_render_error`,
            `llm_response_parse_error`).
        '500':
          description: Internal error while running the metric.
      deprecated: true
      security:
        - BearerAuth: []
components:
  schemas:
    LegacyRunMetricRequest:
      type: object
      properties:
        metric:
          $ref: '#/components/schemas/LegacyRunMetricRequestMetric'
        event:
          $ref: '#/components/schemas/LegacyRunMetricRequestEvent'
      required:
        - metric
        - event
      description: >-
        Request body for POST /metrics/run_metric (deprecated — use POST
        /metrics/run)
      deprecated: true
    RunMetricResponse:
      type: object
      properties:
        success:
          type: boolean
        loading:
          type: boolean
        result:
          anyOf:
            - type: boolean
            - type: number
            - type: string
            - type: 'null'
        explanation:
          type:
            - string
            - 'null'
      required:
        - success
        - loading
        - result
        - explanation
      description: Response for POST /metrics/run
    LegacyRunMetricRequestMetric:
      type: object
      properties:
        name:
          type: string
          maxLength: 200
        type:
          type: string
          enum:
            - LLM
            - PYTHON
        criteria:
          type: string
          minLength: 1
        description:
          type: string
          default: ''
        return_type:
          type: string
          enum:
            - float
            - boolean
            - string
            - categorical
          default: float
        enabled_in_prod:
          type: boolean
          default: false
        sampling_percentage:
          type: number
          minimum: 0
          maximum: 100
          default: 10
        model_provider:
          type:
            - string
            - 'null'
        model_name:
          type:
            - string
            - 'null'
        scale:
          type:
            - integer
            - 'null'
          exclusiveMinimum: 0
        threshold:
          type:
            - object
            - 'null'
          properties:
            min:
              type: number
            max:
              type: number
            pass_when:
              anyOf:
                - type: boolean
                - type: number
            passing_categories:
              type: array
              items:
                type: string
                maxLength: 200
              minItems: 1
          additionalProperties: false
        categories:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/LegacyRunMetricRequestMetricCategoriesItem'
          minItems: 1
        needs_ground_truth:
          type: boolean
          description: >-
            Deprecated and ignored. Ground-truth use is inferred from the
            evaluator definition.
          deprecated: true
        child_metrics:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/LegacyRunMetricRequestMetricChildMetricsItem'
          minItems: 1
          description: Deprecated and ignored. Composite metrics are no longer supported.
          deprecated: true
        filters:
          $ref: '#/components/schemas/LegacyRunMetricRequestMetricFilters'
      required:
        - name
        - type
        - criteria
      additionalProperties: false
    LegacyRunMetricRequestEvent:
      type: object
      properties:
        event_type:
          type: string
        event_name:
          type: string
        inputs:
          type: object
          additionalProperties: {}
        outputs:
          type: object
          additionalProperties: {}
        workspace_id:
          type: string
          description: >-
            Deprecated: ignored. The metric runs with the provider credentials
            of the workspace that contains the request’s project.
          deprecated: true
        feedback:
          $ref: '#/components/schemas/LegacyRunMetricRequestEventFeedback'
      additionalProperties: {}
    LegacyRunMetricRequestMetricCategoriesItem:
      type: object
      properties:
        category:
          type: string
          maxLength: 200
        score:
          type:
            - number
            - 'null'
      required:
        - category
        - score
      additionalProperties: false
    LegacyRunMetricRequestMetricChildMetricsItem:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        name:
          type: string
          maxLength: 200
        weight:
          type: number
        scale:
          type:
            - integer
            - 'null'
          exclusiveMinimum: 0
      required:
        - name
        - weight
      additionalProperties: false
    LegacyRunMetricRequestMetricFilters:
      type: object
      properties:
        filterArray:
          $ref: '#/components/schemas/FiltersArray'
      default:
        filterArray: []
      required:
        - filterArray
      additionalProperties: false
    LegacyRunMetricRequestEventFeedback:
      type: object
      properties:
        ground_truth: {}
      additionalProperties: {}
    FiltersArray:
      type: array
      items:
        $ref: '#/components/schemas/SingleFilter'
    SingleFilter:
      type: object
      properties:
        field:
          type: string
        operator:
          type: string
          enum:
            - exists
            - not exists
            - is
            - is not
            - contains
            - not contains
            - greater than
            - less than
            - after
            - before
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: 'null'
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - datetime
      required:
        - field
        - operator
        - value
        - type
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

## Related topics

- [Run a metric evaluation](https://docs.honeyhive.ai/v2/api-reference-autogen/metrics/run-a-metric-evaluation.md)
- [RunMetricRequest](https://docs.honeyhive.ai/v2/sdk-reference/typescript/ref/metrics/RunMetricRequest.md)
- [RunMetricResponse](https://docs.honeyhive.ai/v2/sdk-reference/typescript/ref/metrics/RunMetricResponse.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.