Get Total Activation Data Trend

Last Updated on : 2024-06-26 09:20:59download

Get the total activation data trend of the devices, and analyze the data based on the country and date dimension.

API address

GET: /v1.0/iot-data/devices/activation-total

Request parameter

Parameter nameTypeINRequiredDescription
paramsStringquerytrueThe request parameter.

Description of params

Parameter nameTypeINRequiredDescription
countryString falseThe country name in English.
pidString falseThe product ID (PID) under a specified account of Tuya Developer Platform. Only a single PID is supported.
startDayString trueThe starting date (inclusive) in the format of YYYYMMDD.
endDayString trueThe ending date (inclusive) in the format of YYYYMMDD.

Return parameter

Parameter nameTypeDescription
resultJSONArrayThe list of returned results.

Description of result

Parameter nameTypeDescription
activationNumTotalIntegerThe total number of activated devices.
activationNumThirtyDayIntegerThe number of activated devices in the last 30 days.
activationNumTodayIntegerThe number of today's activated devices.
activeNumTodayIntegerThe number of today's active devices.
activeNumSevenDayIntegerThe number of active devices in the last 7 days.
activeNumFourteenDayIntegerThe number of active devices in the last 14 days.
countryNameStringThe country name in Chinese.
countryNameEnStringThe country name in English.
dtStringThe date in the format of YYYYMMDD.

Request example

GET: /v1.0/iot-data/devices/activation-total?params={"startDay":"20221206" ,"endDay":"20221212"}

Return example

{
    "result": [
        {
            "activeNumFourteenDay": 146,
            "activeNumToday": 13,
            "countryNameEn": "China",
            "dt": "20220103",
            "activationNumToday": 13,
            "activeNumSevenDay": 79,
            "activationNumThirtyDay": 260,
            "activationNumTotal": 1863,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 146,
            "activeNumToday": 8,
            "countryNameEn": "China",
            "dt": "20220104",
            "activationNumToday": 8,
            "activeNumSevenDay": 70,
            "activationNumThirtyDay": 263,
            "activationNumTotal": 1871,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 142,
            "activeNumToday": 8,
            "countryNameEn": "China",
            "dt": "20220105",
            "activationNumToday": 7,
            "activeNumSevenDay": 61,
            "activationNumThirtyDay": 254,
            "activationNumTotal": 1878,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 136,
            "activeNumToday": 7,
            "countryNameEn": "China",
            "dt": "20220106",
            "activationNumToday": 7,
            "activeNumSevenDay": 62,
            "activationNumThirtyDay": 261,
            "activationNumTotal": 1885,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 142,
            "activeNumToday": 18,
            "countryNameEn": "China",
            "dt": "20220107",
            "activationNumToday": 18,
            "activeNumSevenDay": 73,
            "activationNumThirtyDay": 265,
            "activationNumTotal": 1903,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 142,
            "activeNumToday": 27,
            "countryNameEn": "China",
            "dt": "20220108",
            "activationNumToday": 11,
            "activeNumSevenDay": 74,
            "activationNumThirtyDay": 269,
            "activationNumTotal": 1914,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 148,
            "activeNumToday": 17,
            "countryNameEn": "China",
            "dt": "20220109",
            "activationNumToday": 17,
            "activeNumSevenDay": 81,
            "activationNumThirtyDay": 273,
            "activationNumTotal": 1931,
            "countryName": "中国"
        },
        {
            "activeNumFourteenDay": 158,
            "activeNumToday": 27,
            "countryNameEn": "China",
            "dt": "20220110",
            "activationNumToday": 11,
            "activeNumSevenDay": 79,
            "activationNumThirtyDay": 283,
            "activationNumTotal": 1942,
            "countryName": "中国"
        }
    ],
    "t": 1641902767155,
    "success": true
}

Error code

For more information, see error code.