---
title: "Get Function Metrics"
method: GET
path: "/v3/functions/metrics"
tags: ["Function Accuracy"]
---

# Get Function Metrics

`GET /v3/functions/metrics`

**Retrieve performance metrics for functions based on labeled transformation data.**

Calculates accuracy, precision, recall, F1, and the underlying confusion-matrix
counts for each matching function by comparing model outputs against user
corrections. Metrics are aggregated across every transformation the function
has produced, regardless of function type — `extract`, `transform`, `analyze`,
and `join` all populate the same `metrics` column on the transformation row,
so v3 surfaces all of them uniformly.

## Filtering

Combine `functionIDs` / `functionNames` / `types` to narrow the result set.
`types` accepts `extract` alongside the legacy `transform` / `analyze` types
(which remain readable). Pagination is cursor-based.

## Requirements

A function only shows non-zero metrics once at least one of its transformations
has been labeled — submit corrections via `POST /v3/events/{eventID}/feedback`.

## Query parameters

- `limit` integer
- `functionIDs` string[]
- `functionNames` string[]
- `types` FunctionType[]
- `displayName` string
- `tags` string[]
- `workflowIDs` string[]
- `workflowNames` string[]
- `workflowIDVersionNums` string[]
- `workflowNameVersionNums` string[]
- `sortOrder` 'asc' | 'desc'
- `startingAfter` string
- `endingBefore` string

## Response `200`

The request has succeeded.

- FunctionMetricsResponse
  - `functions` FunctionMetrics[], required
    - `functionName` string, required — The function name
    - `totalLabeledResults` integer, required — Number of transformations that have been labeled/evaluated for metrics calculation
    - `totalResults` integer, required — Total number of results processed by the function
    - `metrics` object, required
      - `accuracy` number, float, nullable, required
      - `precision` number, float, nullable, required
      - `recall` number, float, nullable, required
      - `f1Score` number, float, nullable, required
      - `tp` integer, required
      - `fp` integer, required
      - `tn` integer, required
      - `fn` integer, required
  - `totalCount` integer, required — Total number of functions

---

[API](https://skmtc.dev/bem-team/apis/bem-api.md) · [All operations](https://skmtc.dev/bem-team/apis/bem-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bem-team/bem-api/revisions/a6e4624117c6/schema)
