---
title: "Get Request Facet Metrics"
method: GET
path: "/v0/requests/facets/metrics"
tags: ["Requests"]
---

# Get Request Facet Metrics

`GET /v0/requests/facets/metrics`

Requests and credits consumed per observed filter value, plus the search patterns of the selected window. Companion to /v0/requests/facets, which returns the values themselves: this one derives search-pattern keys and joins the credit ledger, so it is the slower of the two.

## Query parameters

- `start_datetime` string, date-time, nullable
- `end_datetime` string, date-time, nullable
- `origins` UsageOrigin[], nullable
  - union
    - 'api' | 'app' | 'web' | 'mcp' | 'admin_mcp'
    - 'unassigned' | 'webhook'
- `endpoints` string[], nullable
- `status_codes` integer[], nullable
- `api_key_id` string, uuid, nullable
- `search_pattern_key` string, nullable
- `endpoint` string, nullable
- `origin` 'api' | 'app' | 'web' | 'mcp' | 'admin_mcp'
- `is_origin_app` boolean, nullable
- `types` RequestType[], nullable
- `min_credits_consumed` integer, nullable — Only requests whose total (api + ui) credits consumed are at least this.
- `max_credits_consumed` integer, nullable — Only requests whose total (api + ui) credits consumed are at most this.

## Response `200`

Successful Response

- RequestFacetMetrics — How much each value is used, plus the search patterns, whose keys are derived the same expensive way the totals are. Served apart so the dropdowns never wait for it.
  - `metrics` object
  - `search_patterns` RequestSearchPatternFacet[]
    - `key` string, required
    - `name` string, required
  - `search_pattern_keys` string[]

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-11** `16937613a4ec` — 3 warning, 3 info
  - deleted the `query` request parameter `campaign_key`
  - removed the optional property `campaign_keys` from the response with the `200` status
  - removed the optional property `campaigns` from the response with the `200` status
  - added the new optional `query` request parameter `search_pattern_key`
  - …2 more
- **2026-09-10** `6862391ec53d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/theirstack/apis/theirstack-api-reference/changes/v0/requests/facets/metrics/get.md)

---

[API](https://skmtc.dev/theirstack/apis/theirstack-api-reference.md) · [All operations](https://skmtc.dev/theirstack/apis/theirstack-api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/theirstack/apis/theirstack-api-reference/revisions/d33f66b4fd81?raw)
