Get App Device Data

Last Updated on : 2023-07-28 06:25:14download

Get the device data on the app, including the total number of activated devices, the number of activated devices, and the number of active devices.

API address

GET: /v1.0/iot-datacenter/app/device/stat

Request parameter

Parameter nameTypeINRequiredDescription
paramsStringquerytrueJSON

Description of params

Parameter nameTypeINRequiredDescription
bizTypeString falseThe user domain.
startDayString trueThe start time.
endDayString trueThe end time.
countryString falseThe country or region.
dimensionString falseThe dimension.

Description of dimension

Parameter nameTypeINRequiredDescription
category_code_1String falseThe first-level category.
category_code_2Integer falseThe second-level category.
product_idInteger falseThe product ID.

Return parameter

Parameter nameTypeDescription
resultJSONArrayThe returned data.

Description of result

Parameter nameTypeDescription
activationTotalNumIntegerThe total number of activated devices.
activationNumIntegerThe number of activated devices.
activeNumIntegerThe number of active devices.
dtIntegerThe date.

Request example

GET: /v1.0/iot-datacenter/app/device/stat?params={"startDay":"20210815" ,"endDay":"20210820","dimension":"category_code_2"}

Return example

{
    "result": [
        {
            "categoryCode2": "cl",
            "activeNum": 0,
            "dt": 20210817,
            "categoryName2": "Curtain",
            "activationTotalNum": 51,
            "activationNum": 0
        },
        {
            "categoryCode2": "wnykq",
            "activeNum": 0,
            "dt": 20210817,
            "categoryName2": "Universal Remote Control",
            "activationTotalNum": 57,
            "activationNum": 0
        },
        {
            "categoryCode2": "sd",
            "activeNum": 0,
            "dt": 20210818,
            "categoryName2": "Robot Vacuum",
            "activationTotalNum": 120,
            "activationNum": 0
        },
        {
            "categoryCode2": "pbj",
            "activeNum": 0,
            "dt": 20210818,
            "categoryName2": "Blender",
            "activationTotalNum": 8,
            "activationNum": 0
        },
        {
            "categoryCode2": "td",
            "activeNum": 1,
            "dt": 20210819,
            "categoryName2": "Desk Lamp/Floor Lamp",
            "activationTotalNum": 45,
            "activationNum": 1
        },
        {
            "categoryCode2": "pbj",
            "activeNum": 0,
            "dt": 20210819,
            "categoryName2": "Blender",
            "activationTotalNum": 8,
            "activationNum": 0
        },
        {
            "categoryCode2": "cz",
            "activeNum": 2,
            "dt": 20210820,
            "categoryName2": "Socket",
            "activationTotalNum": 66,
            "activationNum": 0
        }
    ],
    "t": 1630122549035,
    "success": true
}

Error code

For more information, see error code.