---
title: "Get realtime metrics for a specific priority"
method: GET
path: "/priorities/{id}/metrics/realtime"
tags: ["Analytics"]
---

# Get realtime metrics for a specific priority

`GET /priorities/{id}/metrics/realtime`

## Request

- Base URL: `https://priorityprotect-api.datadome.co/v1`
- URL: `https://priorityprotect-api.datadome.co/v1/priorities/{id}/metrics/realtime`
- Auth: API key in header `x-api-key`

Returns one reading of the last 30 seconds before the request. Gauge fields (`currentVisitors`, `waitingVisitors`, `maxConcurrentVisitors`) and `state` take the values of the newest metrics document in the window, and `timestamp` is the time of that document. Rate fields (`*RatePerMinute`) are the average over the window, rounded to an integer. `data` is null when no reading is available: no metrics document in the last 30 seconds, the newest document has no readable timestamp, or the metrics store could not be read.

## Path parameters

- `id` string, uuid, required

## Response `200`

Successful response with the realtime reading.

- PriorityRealtimeMetricsResponse
  - `meta` RealtimeMetricsMeta, required: Metadata of the reading.
    - `interval` '30s', required: Length of the window the reading covers. Always 30s.
  - `data` RealtimeMetricsReading, required
    - `timestamp` string, date-time, required: Timestamp of the newest metrics document in the window, in UTC.
    - `metrics` object, required: Gauge fields come from the newest document. Rate fields are the window average, rounded.
      - `currentVisitors` integer, required: Gauge. Number of current visitors on the site in the newest document.
      - `waitingVisitors` integer, required: Gauge. Number of visitors waiting in the priority in the newest document.
      - `maxConcurrentVisitors` integer, required: Gauge. Maximum concurrent visitors allowed (from configuration) in the newest document.
      - `admissionRatePerMinute` integer, required: Rate. Admission rate per minute (from configuration), averaged over the window.
      - `newVisitorsRatePerMinute` integer, required: Rate. Actual rate of new visitors entering the site per minute, averaged over the window.
      - `waitingRatePerMinute` integer, required: Rate. Actual rate of visitors entering the waiting queue per minute, averaged over the window.
      - `admittedRatePerMinute` integer, required: Rate. Actual rate of visitors admitted from the queue per minute, averaged over the window.
    - `state` object, required: Status and mode of the priority in the newest document.
      - `status` 'off' | 'inPreAdmission' | 'inProgress', required: The operational status of the queue in the newest document.
      - `mode` 'alwaysOn' | 'scheduled', required: The configuration mode in the newest document.

## Other responses

- `401`: Unauthorized - missing or invalid API key.
- `403`: Forbidden. The provided API key is valid, but the user does not have sufficient permissions to perform this operation.
- `404`: Resource not found.

---

[API](https://skmtc.dev/datadome/apis/priority-protect-management-api.md) - [All operations](https://skmtc.dev/datadome/apis/priority-protect-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/datadome/apis/priority-protect-management-api/revisions/0eb7133cb637?raw)
