---
title: "Get a metric definition"
method: GET
path: "/v1/metric/definitions/{idOrSlug}"
tags: ["Metric"]
---

# Get a metric definition

`GET /v1/metric/definitions/{idOrSlug}`

Fetch a single metric definition by its UUID or its stable `slug` (e.g. `customer_satisfaction`). Resolution is scoped to the project — a project-owned metric wins over an org-wide one, which wins over a system metric of the same `slug`.

## Path parameters

- `idOrSlug` string, required

## Response `200`

The metric definition

- object
  - `data` union, required — Metric definition data. The variant is selected by `calculationType`.
    - LlmJudgeMetricResponse
      - `id` string, uuid, required — Unique identifier for the metric definition
      - `slug` string, required — Stable metric slug (e.g. "call_reason", "customer_satisfaction")
      - `metricId` string, required — Alias of `slug` retained for backwards compatibility. Same value as `slug`.
      - `variantId` string, uuid, required — The resolved variant this response reflects (org-scoped Default if the org has customized it, otherwise the system Default). Pass this as sourceVariantId when building a derived metric off this one to pin the exact config.
      - `versionId` string, uuid, required — The variant's current version. Immutable snapshot of the config — editing the metric produces a new versionId. Use it to detect config changes.
      - `name` string, required — Name of the metric
      - `description` string, required — Description of what the metric measures
      - `type` 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET', required — Type of value this metric produces
      - `scope` 'GLOBAL' | 'PER_PARTICIPANT', required — Whether metric is global or per-participant
      - `supportedContexts` string[], required — Which levels this metric can produce values at
      - `unit` object — Unit information if applicable
        - `name` string, required — Name of the unit
        - `symbol` string, nullable, required — Symbol for the unit
      - `calculationType` 'LLM_JUDGE', required — Metric evaluated by an LLM against a prompt.
    - ProviderMetricResponse
      - `id` string, uuid, required — Unique identifier for the metric definition
      - `slug` string, required — Stable metric slug (e.g. "call_reason", "customer_satisfaction")
      - `metricId` string, required — Alias of `slug` retained for backwards compatibility. Same value as `slug`.
      - `variantId` string, uuid, required — The resolved variant this response reflects (org-scoped Default if the org has customized it, otherwise the system Default). Pass this as sourceVariantId when building a derived metric off this one to pin the exact config.
      - `versionId` string, uuid, required — The variant's current version. Immutable snapshot of the config — editing the metric produces a new versionId. Use it to detect config changes.
      - `name` string, required — Name of the metric
      - `description` string, required — Description of what the metric measures
      - `type` 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET', required — Type of value this metric produces
      - `scope` 'GLOBAL' | 'PER_PARTICIPANT', required — Whether metric is global or per-participant
      - `supportedContexts` string[], required — Which levels this metric can produce values at
      - `unit` object — Unit information if applicable
        - `name` string, required — Name of the unit
        - `symbol` string, nullable, required — Symbol for the unit
      - `calculationType` 'PROVIDER', required — System-managed metric produced by an analysis provider.
    - ThresholdMetricResponse
      - `id` string, uuid, required — Unique identifier for the metric definition
      - `slug` string, required — Stable metric slug (e.g. "call_reason", "customer_satisfaction")
      - `metricId` string, required — Alias of `slug` retained for backwards compatibility. Same value as `slug`.
      - `variantId` string, uuid, required — The resolved variant this response reflects (org-scoped Default if the org has customized it, otherwise the system Default). Pass this as sourceVariantId when building a derived metric off this one to pin the exact config.
      - `versionId` string, uuid, required — The variant's current version. Immutable snapshot of the config — editing the metric produces a new versionId. Use it to detect config changes.
      - `name` string, required — Name of the metric
      - `description` string, required — Description of what the metric measures
      - `type` 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET', required — Type of value this metric produces
      - `scope` 'GLOBAL' | 'PER_PARTICIPANT', required — Whether metric is global or per-participant
      - `supportedContexts` string[], required — Which levels this metric can produce values at
      - `unit` object — Unit information if applicable
        - `name` string, required — Name of the unit
        - `symbol` string, nullable, required — Symbol for the unit
      - `calculationType` 'THRESHOLD', required — Boolean metric derived by comparing a source metric against a threshold.
      - `threshold` ThresholdMetricDetails
        - `sourceMetricDefinitionId` string, uuid, required
        - `operator` 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS', required
        - `thresholdValue` string, required
        - `aggregationMode` 'EACH' | 'COUNT' | 'AVERAGE' | 'MIN' | 'MAX' | 'MEDIAN' | 'P95' | 'P99' | 'SUM', required
        - `countThreshold` integer, nullable, required
        - `sourceParticipantRole` 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER', nullable, required
        - `sourceVariantId` string, uuid, nullable, required
    - FormulaMetricResponse
      - `id` string, uuid, required — Unique identifier for the metric definition
      - `slug` string, required — Stable metric slug (e.g. "call_reason", "customer_satisfaction")
      - `metricId` string, required — Alias of `slug` retained for backwards compatibility. Same value as `slug`.
      - `variantId` string, uuid, required — The resolved variant this response reflects (org-scoped Default if the org has customized it, otherwise the system Default). Pass this as sourceVariantId when building a derived metric off this one to pin the exact config.
      - `versionId` string, uuid, required — The variant's current version. Immutable snapshot of the config — editing the metric produces a new versionId. Use it to detect config changes.
      - `name` string, required — Name of the metric
      - `description` string, required — Description of what the metric measures
      - `type` 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET', required — Type of value this metric produces
      - `scope` 'GLOBAL' | 'PER_PARTICIPANT', required — Whether metric is global or per-participant
      - `supportedContexts` string[], required — Which levels this metric can produce values at
      - `unit` object — Unit information if applicable
        - `name` string, required — Name of the unit
        - `symbol` string, nullable, required — Symbol for the unit
      - `calculationType` 'FORMULA', required — Metric computed by evaluating an expression over other metrics.
      - `formula` FormulaMetricDetails, required
        - `expression` string, required
        - `sources` object[], required
          - `sourceMetricDefinitionId` string, uuid, required
          - `sourceVariantId` string, uuid, nullable, required
    - PatternMetricResponse
      - `id` string, uuid, required — Unique identifier for the metric definition
      - `slug` string, required — Stable metric slug (e.g. "call_reason", "customer_satisfaction")
      - `metricId` string, required — Alias of `slug` retained for backwards compatibility. Same value as `slug`.
      - `variantId` string, uuid, required — The resolved variant this response reflects (org-scoped Default if the org has customized it, otherwise the system Default). Pass this as sourceVariantId when building a derived metric off this one to pin the exact config.
      - `versionId` string, uuid, required — The variant's current version. Immutable snapshot of the config — editing the metric produces a new versionId. Use it to detect config changes.
      - `name` string, required — Name of the metric
      - `description` string, required — Description of what the metric measures
      - `type` 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET', required — Type of value this metric produces
      - `scope` 'GLOBAL' | 'PER_PARTICIPANT', required — Whether metric is global or per-participant
      - `supportedContexts` string[], required — Which levels this metric can produce values at
      - `unit` object — Unit information if applicable
        - `name` string, required — Name of the unit
        - `symbol` string, nullable, required — Symbol for the unit
      - `calculationType` 'PATTERN', required — Metric detecting a trigger condition followed by an outcome within a window.
      - `pattern` PatternMetricDetails, required
        - `operation` 'PATTERN_EXISTS' | 'PATTERN_COUNT' | 'OUTCOME_AGGREGATE', required
        - `windowMode` string, nullable, required
        - `triggerCombinator` 'AND' | 'OR', nullable, required
        - `triggers` object[], required
          - `sourceMetricDefinitionId` string, uuid, required
          - `operator` 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS', required
          - `thresholdValue` string, required
          - `sourceParticipantRole` 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER', nullable, required
          - `sourceVariantId` string, uuid, nullable, required
        - `outcome` object, nullable, required
          - `sourceMetricDefinitionId` string, uuid, required
          - `operator` 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'EQUALS' | 'NOT_EQUALS', required
          - `thresholdValue` string, required
          - `sourceParticipantRole` 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER', nullable, required
          - `sourceVariantId` string, uuid, nullable, required
          - `windowBefore` integer, nullable, required
          - `windowAfter` integer, nullable, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests
- `500` — Internal Server Error

## Changes

- **2026-08-17** `887b091b3d81` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/roarkhq/apis/roark-analytics-api/changes/v1/metric/definitions/:idOrSlug/get.md)

---

[API](https://skmtc.dev/roarkhq/apis/roark-analytics-api.md) · [All operations](https://skmtc.dev/roarkhq/apis/roark-analytics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/roarkhq/roark-analytics-api/revisions/1d61b68e9429/schema)
