Get an Overview of Activated Device Data

Last Updated on : 2023-06-15 05:10:33

Get an overview of activated device data based on the product ID.

API address

GET: /v1.0/devices/active-datas-survey

Request parameter

Parameter nameTypeINRequiredDescription
product_idStringqueryfalseThe product ID (PID). If you do not set the parameter, all products under the specified IoT account of this clientId are returned.

Return parameter

Parameter nameTypeDescription
resultJSONObjectThe returned result.

Description of result

Parameter nameTypeDescription
today_activeStringThe number of devices activated today.
yesterday_activeStringThe number of devices activated yesterday.
all_activateStringThe total number of activated devices.
near7_day_activeStringThe number of devices activated in the last seven days.
last7_day_activeStringThe number of devices activated within the seven days starting from 14 days ago.
compared_with_yesterday_activeStringThe difference between the number of devices activated today and that of yesterday.

Request example

GET: /v1.0/devices/active-datas-survey?product_id=123

Return example

{
    "result": {
        "last7_day_active": "8",
        "all_activate": "5237",
        "near7_day_active": "2",
        "today_active": "0",
        "yesterday_active": "0"
    },
    "t": 1545278901275,
    "success": true
}

Error code

For more information, see error code.