---
title: "Get the statistics from an IoT hub"
method: GET
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats"
tags: ["GET"]
---

# Get the statistics from an IoT hub

`GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats`

Get the statistics from an IoT hub.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `resourceName` string, required

## Query parameters

- `api-version` string, required

## Response `200`

This is a synchronous operation. The body contains JSON-serialized statistics from the identity registry in the IoT hub.

- RegistryStatistics — Identity registry statistics.
  - `totalDeviceCount` integer — The total count of devices in the identity registry.
  - `enabledDeviceCount` integer — The count of enabled devices in the identity registry.
  - `disabledDeviceCount` integer — The count of disabled devices in the identity registry.

## Other responses

- `default` — DefaultErrorResponse

---

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