Query User Information

Last Updated on : 2023-06-21 07:13:08

Query the data of a single user or multiple users according to username or user list page.

API address

GET: /v1.0/iot-03/users

Request parameter

Parameter nameTypeINRequiredDescription
user_condition_reqQueryUserConditionReq falseThe request of querying the user information.

Description of user_condition_req

Parameter nameTypeINRequiredDescription
nameString falseThe username.
mobileString falseThe mobile phone number.
emailString falseThe email address.
user_noString falseThe work number.
org_idString falseThe ID of a specified organization.
last_row_keyString falseThe device ID in the last entry on each page.
page_sizeInteger falseThe number of items returned on each page.

Return parameter

Parameter nameTypeDescription
resultCursorPage

Description of result

Parameter nameTypeDescription
has_moreBooleanSpecifies whether to return the next page.
listList
last_row_keyStringThe device ID in the last entry on each page.

Description of list

Parameter nameTypeDescription
idStringThe user ID.
external_idStringThe external ID.
user_noStringThe student number or work number.
user_accountStringThe username.
nameStringThe name.
mobileStringThe mobile phone number.
emailStringThe email address.
genderStringThe gender.
statusIntegerThe status. Valid values: 0: Disabled. 1: Enabled.
start_timeLongThe start time.
end_timeLongThe end time.

Request example

GET: /v1.0/iot-03/users?page_size=20&name=tset****

Return example

{
    "result": {
        "last_row_key": "140261201717238****",
        "list": [
            {
                "gender": "1",
                "end_time": 1621183690538,
                "mobile": "1667677****",
                "external_id": "322****",
                "user_no": "2013****",
                "start_time": 1621183630538,
                "name": "jinyunt****",
                "user_account": "1112323****",
                "id": "bsh1621492009764I****",
                "email": "123****@tuya.com",
                "status": 1
            }
        ],
        "has_more": false
    },
    "t": 1623772488275,
    "success": true
}

Error code

For more information, see error code.