Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Usage Statistics

Overview

This document describes Usage Statistics endpoints for retrieving metrics about Devices and Gateways in the system.

The API provides insights across different dimensions:

  • Active usage (devices/gateways that were active in a period)
  • Total counts (all entities stored in the system)
  • Max usage (peak values within a month)
  • Integration metrics (processed uplinks/downlinks and traffic volume)
  • Sets (lists of active entities for a period)

Key Definitions

Active Device

A device is considered active if:

  • It reports at least one uplink (UL) during the selected period, OR
  • The Network Server sends at least one downlink (DL) to the gateway during the selected period.

Active Gateway

A gateway is considered active if:

  • It sends at least one message/event/statistics record during the period, AND/OR
  • It receives at least one message during the period.

Total Devices / Gateways

Represents the current number of provisioned entities in the system at the time of request (active + inactive).

Max Devices / Gateways

Represents the maximum number of entities observed in the database during a given month.


Common Parameters

Parameter Format Description
day YYYY-MM-DD Daily statistics
month YYYY-MM Monthly statistics
{applicationId} string Application identifier
{providerId} string Provider identifier
{customerId} string Customer identifier
{subCustomerId} string Sub-customer identifier
{gatewayGroupId} string Gateway Group identifier
{integrationId} string Integration identifier

⚠️ Note: Only one parameter is allowed per request: either day OR month.


1. Usage Statistics API

1.1 Active Statistics

Active endpoints return the number of devices or gateways that were active during a selected period.


Active Devices

Application

/api/statistics/application/{applicationId}/devices/active?day=YYYY-MM-DD

/api/statistics/application/{applicationId}/devices/active?month=YYYY-MM


Provider

/api/statistics/provider/{providerId}/devices/active?month=YYYY-MM


Customer

/api/statistics/customer/{customerId}/devices/active?month=YYYY-MM


Sub-Customer

/api/statistics/subCustomer/{subCustomerId}/devices/active?month=YYYY-MM-DD


All Customers

/api/statistics/all/customers/devices/active?month=YYYY-MM

/api/statistics/all/customers/devices/active?day=YYYY-MM-DD

Headers required:

  • username
  • password

All Providers

/api/statistics/all/providers/devices/active?month=YYYY-MM

/api/statistics/all/providers/devices/active?day=YYYY-MM-DD

Headers required:

  • username
  • password (Sysadmin)

All Sub-Customers

/api/statistics/all/subCustomers/devices/active?month=YYYY-MM

/api/statistics/all/subCustomers/devices/active?day=YYYY-MM-DD

Headers required:

  • username
  • password (Customer)

Active Gateways

Provider

/api/statistics/provider/{providerId}/gateways/active?day=YYYY-MM-DD


Customer

/api/statistics/customer/{customerId}/gateways/active?month=YYYY-MM


Gateway Group

/api/statistics/gatewayGroup/{gatewayGroupId}/gateways/active?day=YYYY-MM-DD


All Customers

/api/statistics/all/customers/gateways/active?month=YYYY-MM

/api/statistics/all/customers/gateways/active?day=YYYY-MM-DD

Headers required:

  • username
  • password

All Providers

/api/statistics/all/providers/gateways/active?month=YYYY-MM

/api/statistics/all/providers/gateways/active?day=YYYY-MM-DD

Headers required:

  • username
  • password (Sysadmin)

2. Total Statistics

Returns total number of entities currently stored in DB (active + inactive).


Total Devices

Application

/api/statistics/application/{applicationId}/devices/total

Provider

/api/statistics/provider/{providerId}/devices/total

Customer

/api/statistics/customer/{customerId}/devices/total

Sub-Customer

/api/statistics/subCustomer/{subCustomerId}/devices/total

All Customers

/api/statistics/all/customers/devices/total

All Providers

/api/statistics/all/providers/devices/total

All Sub-Customers

/api/statistics/all/subCustomers/devices/total

Headers required (All* endpoints):

  • username
  • password

Total Gateways

Provider

/api/statistics/provider/{providerId}/gateways/total

Customer

/api/statistics/customer/{customerId}/gateways/total

Gateway Group

/api/statistics/gatewayGroup/{gatewayGroupId}/gateways/total

All Customers

/api/statistics/all/customers/gateway/total

All Providers

/api/statistics/all/providers/gateways/total

Headers required (All* endpoints):

  • username
  • password

3. Max Statistics

Returns the maximum number of devices/gateways observed within a month.

⚠️ Only month parameter is supported.


Max Devices

Application

/api/statistics/application/{applicationId}/devices/max?month=YYYY-MM

Provider

/api/statistics/provider/{providerId}/devices/max?month=YYYY-MM

Customer

/api/statistics/customer/{customerId}/devices/max?month=YYYY-MM

Sub-Customer

/api/statistics/subCustomer/{subCustomerId}/devices/max?month=YYYY-MM

All Customers

/api/statistics/all/customers/devices/max?month=YYYY-MM

All Providers

/api/statistics/all/providers/devices/max?month=YYYY-MM

All Sub-Customers

/api/statistics/all/SubCustomers/devices/max?month=YYYY-MM


Max Gateways

Provider

/api/statistics/provider/{providerId}/gateways/max?month=YYYY-MM

Customer

/api/statistics/customer/{customerId}/gateways/max?month=YYYY-MM

Gateway Group

/api/statistics/gatewayGroup/{gatewayGroupId}/gateways/max?month=YYYY-MM

All Customers

/api/statistics/all/customers/gateways/max?month=YYYY-MM

All Providers

/api/statistics/all/providers/gateways/max?month=YYYY-MM


4. Integration Statistics

Integration metrics describe data processed by external integrations.

Key Terms

  • Processed uplink: UL processed and forwarded (may fail delivery due to HTTP/MQTT issues)
  • Processed downlink: DL received via HTTP/MQTT
  • Volume: total payload size in bytes

/api/statistics/integration/{integrationId}/uplink/processed/count?month=YYYY-MM

/api/statistics/application/{applicationId}/uplink/processed/count?day=YYYY-MM-DD

/api/statistics/customer/{customerId}/uplink/processed/count?month=YYYY-MM

/api/statistics/subcustomer/{subcustomerId}/uplink/processed/count?day=YYYY-MM-DD


/api/statistics/integration/{integrationId}/uplink/processed/volume?month=YYYY-MM

/api/statistics/application/{applicationId}/uplink/processed/volume?day=YYYY-MM-DD

/api/statistics/customer/{customerId}/uplink/processed/volume?month=YYYY-MM

/api/statistics/subcustomer/{subcustomerId}/uplink/processed/volume?day=YYYY-MM-DD


/api/statistics/integration/{integrationId}/downlink/processed/count?day=YYYY-MM-DD

/api/statistics/application/{applicationId}/downlink/processed/count?month=YYYY-MM-DD

/api/statistics/customer/{customerId}/downlink/processed/count?month=YYYY-MM-DD

/api/statistics/subcustomer/{subcustomerId}/downlink/processed/count?day=YYYY-MM-DD


/api/statistics/integration/{integrationId}/downlink/processed/volume?day=YYYY-MM-DD

/api/statistics/application/{applicationId}/downlink/processed/volume?month=YYYY-MM-DD

/api/statistics/customer/{customerId}/downlink/processed/volume?month=YYYY-MM-DD

/api/statistics/subcustomer/{subcustomerId}/downlink/processed/volume?day=YYYY-MM-DD


5. Active Sets

These endpoints return lists of active devices or gateways for a given period.

If no data exists for the period → empty set is returned.


Active Devices Set

/api/statistics/application/{applicationId}/devices/active/set?month=YYYY-MM

/api/statistics/customer/{customerId}/devices/active/set?month=YYYY-MM

/api/statistics/gatewayGroup/{gatewayGroupId}/devices/active/set?month=YYYY-MM

/api/statistics/provider/{providerId}/devices/active/set?month=YYYY-MM

/api/statistics/subCustomer/{subCustomerId}/devices/active/set?month=YYYY-MM


Active Gateways Set

/api/statistics/customer/{customerId}/gateways/active/set?month=YYYY-MM

/api/statistics/gatewayGroup/{gatewayGroupId}/gateways/active/set?month=YYYY-MM

/api/statistics/provider/{providerId}/gateways/active/set?month=YYYY-MM


Active Sets with Credentials (Tabular)

Returns active sets using user credentials in tabular format.

/api/statistics/application/{applicationId}/devices/active/set/withCredentials/tabular?month=YYYY-MM

/api/statistics/customer/{customerId}/devices/active/set/withCredentials/tabular?month=YYYY-MM

/api/statistics/gatewayGroup/{gatewayGroupId}/devices/active/set/withCredentials/tabular?month=YYYY-MM

/api/statistics/provider/{providerId}/devices/active/set/withCredentials/tabular?month=YYYY-MM

/api/statistics/subCustomer/{subCustomerId}/devices/active/set/withCredentials/tabular?month=YYYY-MM


Summary

This API group provides:

  • Operational visibility (active usage)
  • System inventory (total counts)
  • Peak load analytics (max values)
  • Data processing insights (integration metrics)
  • Detailed entity-level activity sets

All endpoints are designed for reporting, billing, monitoring, and system analytics.