---
title: "Histogram + summary stats for a metric in a scope"
method: POST
path: "/v1/analytics.getDistribution"
tags: ["analytics"]
---

# Histogram + summary stats for a metric in a scope

`POST /v1/analytics.getDistribution`

## Request body

- AnalyticsGetDistributionRequestBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `domain` string, required — Analytics domain ID. See analytics.listMetrics.
  - `metric` string, required — Metric ID within the domain.
  - `scope` string, required — Scope ID within the domain (global, country, region, …).
  - `scope_value` string — Scope value — country name or ISO code ("Germany" / "DE"), region name ("Europe"). Required for non-global scopes.

## Response `200`

OK

- AnalyticsDistribution
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `bins` AnalyticsBin[], nullable, required
    - `count` number, double, required
    - `x_lower` number, double, required
    - `x_upper` number, double, required
  - `summary` AnalyticsSummary, required
    - `count` integer, required
    - `max` number, double, required
    - `mean` number, double, required
    - `min` number, double, required
    - `p50` number, double, required
    - `p90` number, double, required
    - `p99` number, double, required

## Other responses

- `400` — Bad Request
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/steamsets/apis/steamsets-api.md) · [All operations](https://skmtc.net/steamsets/apis/steamsets-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/steamsets/steamsets-api/versions/593d89718daa/schema)
