---
title: "Get Device Analytics"
method: GET
path: "/get_device_analytics"
tags: ["Device Interactions"]
---

# Get Device Analytics

`GET /get_device_analytics`

## Request

- Base URL: `https://api.developer.atomberg-iot.com/v2`
- URL: `https://api.developer.atomberg-iot.com/v2/get_device_analytics`
- Auth: API key in header `x-api-key` and HTTP bearer

Total usage figures. Fans report energy used and running time. Water purifiers report water saved and UV lamp running time.

Smart locks have no analytics. With `device_id=all`, locks are left out. Asking for a lock by its `device_id` returns a `400`.

If a device has never reported these counters, the fields are `null`, not zero. This way you can tell "no data yet" apart from a real zero.

## Fan figures

| Field | Unit | Meaning |
| --- | --- | --- |
| power_consumption | kWh | Total energy used |
| runtime | hours | Total running time |

## Water purifier figures

| Field | Unit | Meaning |
| --- | --- | --- |
| water_saved_liters | litres | Water a comparable 25% recovery unit would have sent to drain (the RO you replaced with Intellon most likely had 25% recovery) |
| uv_runtime_hours | hours | Total UV lamp running time. Useful for planning lamp replacement |

`water_saved_liters` is calculated as **RO litres x 1.5 + UF litres x 3**.

The response key is `device_state`, not `device_analytics`. The name is kept so existing integrations keep working.

## Request

| Where | Name | Required | Value |
| --- | --- | --- | --- |
| Header | `x-api-key` | Yes | Your developer API key. |
| Header | `Authorization` | Yes | `Bearer <access_token>` |
| Query | `device_id` | Yes | One `device_id`, or `all` for every supported device. |

No request body. There is no date range. The figures are lifetime totals
reported by the device.

## Response

```json
{
  "status": "Success",
  "message": {
    "device_state": [
      { "device_id": "6867258b9d78", "power_consumption": 41.2, "runtime": 613.5 },
      { "device_id": "a0764ee4210c", "water_saved_liters": 1284.5, "uv_runtime_hours": 219.0 }
    ]
  }
}
```

Only fans and water purifiers have analytics. With `device_id=all`, devices
without analytics are left out.

## Query parameters

- `device_id` string, required

## Response `200`

OK

- DeviceAnalyticsResponse
  - `status` string: `Success` on a 2xx, `Error` otherwise.
  - `message` object: The response data. Each endpoint has its own format.
    - `device_state` union[]: One entry for each device that has analytics. The key is `device_state`, not `device_analytics`. Devices without analytics are left out.
      - union
        - FanAnalytics
          - `device_id` string: The device these figures belong to.
          - `power_consumption` number, nullable: Total energy used, in **kWh**. `null` if the fan has never reported it.
          - `runtime` number, nullable: Total running time, in **hours**. `null` if the fan has never reported it.
        - WaterPurifierAnalytics
          - `device_id` string: The device these figures belong to.
          - `water_saved_liters` number, nullable: Litres a comparable 25% recovery unit would have sent to drain (the RO you replaced with Intellon most likely had 25% recovery), calculated as `RO litres x 1.5 + UF litres x 3`. `null` if the unit has never reported its flow counters.
          - `uv_runtime_hours` number, nullable: Total UV lamp running time, in **hours**. Useful for planning lamp replacement. `null` if never reported.

## Other responses

- `400`: The request is not valid, or the command is not supported by that device. The message names the wrong key and lists what the device accepts.
- `401`: The API key or token is missing, malformed or expired, or it is the wrong kind of token.
- `403`: Developer Mode is not enabled for this account, or the user does not exist. You also get a 403 when the URL path or HTTP method is wrong.
- `404`: The device is not on your account, or it has not reported any state yet.
- `429`: You have used up your API key's daily quota, or gone over the per-second limit. The daily quota resets at 00:00 UTC.
- `500`: Something failed on our side. Your request was fine. Try again after a short wait.
- `501`: This API does not support the device's series. The message lists the supported series.

## Changes

- **2026-10-06** `30e1ea1bdb73`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/atomberg-iot/apis/atomberg-home-public-apis/changes/get_device_analytics/get.md)

---

[API](https://skmtc.dev/atomberg-iot/apis/atomberg-home-public-apis.md) - [All operations](https://skmtc.dev/atomberg-iot/apis/atomberg-home-public-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/atomberg-iot/apis/atomberg-home-public-apis/revisions/35290532bede?raw)
