Get Data Overview of Active Devices

Last Updated on : 2023-07-28 06:24:28download

Get the data of active devices under the specified product based on the product ID.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
product_idStringqueryfalseThe product ID. If you do not set the parameter, all your product IDs will be returned.

Return parameter

Parameter nameTypeDescription
resultObjectThe returned result.

Description of result

Parameter nameTypeDescription
today_liveStringThe number of active devices today.
yesterday_liveStringThe number of active devices yesterday.
near7_day_liveStringThe number of active devices in the last seven days.
last7_day_liveStringThe number of devices active within the seven days starting from 14 days ago.
compared_with_yesterday_liveStringThe ratio of today's active devices to yesterday's active devices. A value of 2 means that the number of today's active devices is twice that of yesterday.
rate_of_today_liveStringThe number of active devices today divided by total activated devices.

Request example

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

Return example

{
    "result": {
        "last7_day_live": "129",
        "today_live": "99",
        "yesterday_live": "102",
        "near7_day_live": "108",
        "rate_of_today_live": "1.89%"
    },
    "t": 1545278810104,
    "success": true
}

Error code

For more information, see error code.