---
title: "Get Users Count Metric"
method: GET
path: "/api/users/counts/{metric}"
tags: ["User"]
---

# Get Users Count Metric

`GET /api/users/counts/{metric}`

Get one users activity/status count metric from usage rows.

## Path parameters

- `metric` 'online' | 'expired' | 'limited', required

## Query parameters

- `period` 'minute' | 'hour' | 'day' | 'month'
- `node_id` integer, nullable
- `group_by_node` boolean
- `start` string, date-time, nullable
- `end` string, date-time, nullable
- `admin` string[], nullable

## Response `200`

Successful Response

- UserCountMetricStatsList
  - `period` 'minute' | 'hour' | 'day' | 'month'
  - `start` string, date-time, required
  - `end` string, date-time, required
  - `metric` 'online' | 'expired' | 'limited', required
  - `count_during_period` integer
  - `stats` object, required

## Other responses

- `401` — Unauthorized Error
- `422` — Validation Error

---

[API](https://skmtc.dev/ha-man2/apis/pasarguardapi.md) · [All operations](https://skmtc.dev/ha-man2/apis/pasarguardapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ha-man2/pasarguardapi/revisions/84d9ff88fcda/schema)
