Get Daily Activated Devices

Last Updated on : 2023-07-28 08:59:53download

Count the number of daily activated devices based on the start date and end date. The start and end dates cannot be more than 60 days apart.

API address

GET: /v1.0/cloud/analytics/devices/active-datas/date

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
start_dayStringbodytrueThe start date in the format of yyyyMMdd.
end_dayStringbodytrueThe end date in the format of yyyyMMdd. The start and end dates cannot be more than 60 days apart.
product_idStringbodyfalseThe ID of the specified product under the IoT account corresponding to the cloud development project.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.
successBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
tLongThe timestamp.
tidStringThe link ID.

Description of result

Parameter nameTypeDescription
DateIntegerThe number of activated devices under the product ID (if a product_id is specified) or under all product IDs under the IoT account (if a product_id is not specified) on the current day.

Request example

GET: /v1.0/cloud/analytics/devices/active-datas/date?start_day=20230723&end_day=20230729

Return example

{
    "tid": "3b135d8f2b9611ee8b88c69b14dfb1da",
    "result": [
        {
            "20230724": 11
        },
        {
            "20230725": 9
        },
        {
            "20230726": 0
        }
    ],
    "t": 1690363473511,
    "success": true
}

Error code

For more information, see error code.