English
English
简体中文
Contact Us
Register
Log In

Get Devices Controlled on the App

Last Updated on : 2022-09-21 07:11:26download

Get the number of users who control the devices on the app, and the number of device cotnrols on the app.

API address

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

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. Optional.

Description of dimension

Parameter nameTypeINRequiredDescription
category_code_1String falseThe first-level category.
category_code_2Integer falseThe second-level category.
product_idInteger falseThe product ID.
control_typeInteger falseThe device control method.

Return parameter

Parameter nameTypeDescription
resultJSONArrayThe returned result.

Description of result

Parameter nameTypeDescription
uidCntIntegerThe number of users.
useCntIntegerThe times of control.
dtIntegerThe date.

Request example

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

Return example

{
    "result": [
        {
            "productId": "waznuxxxxzec5m",
            "uidCnt": 1,
            "productName": "Tuya_SmartCamera_Demo",
            "dt": 20210817,
            "usedCnt": 9
        },
        {
            "productId": "waznupxxxxgzec5m",
            "uidCnt": 1,
            "productName": "Tuya_SmartCamera_Demo",
            "dt": 20210818,
            "usedCnt": 9
        },
        {
            "productId": "mab2xxxxpawoui1",
            "uidCnt": 1,
            "productName": "Tuya_Erluchapai_Demo",
            "dt": 20210819,
            "usedCnt": 2
        },
        {
            "productId": "waznuxxxxec5m",
            "uidCnt": 1,
            "productName": "Tuya_SmartCamera_Demo",
            "dt": 20210819,
            "usedCnt": 9
        },
        {
            "productId": "qpnghxxxxxtsu5s",
            "uidCnt": 3,
            "productName": "Tuya_RBGLight_Demo",
            "dt": 20210820,
            "usedCnt": 3
        },
        {
            "productId": "q4ely8xxxxxulbh",
            "uidCnt": 1,
            "productName": "Tuya_Socket_Demo",
            "dt": 20210821,
            "usedCnt": 1
        },
        {
            "productId": "0kfxxxxxxaac3h",
            "uidCnt": 2,
            "productName": "Tuya_Light_Demo",
            "dt": 20210822,
            "usedCnt": 2
        },
        {
            "productId": "bovoxxxxxthuygf",
            "uidCnt": 1,
            "productName": "Tuya_RobotVacuum_Demo",
            "dt": 20210823,
            "usedCnt": 6
        }
    ],
    "t": 1630135735402,
    "success": true
}

Error code

For more information, see error code.