Obtain Device List

Feature Description

Obtain all devices under a user account based on user ID

Interface Address

GET /v1.0/users/{uid}/devices

Header Parameter

Parameter name Type Parameter position Description Required
client_id String header client_id Yes
access_token String header Access token for obtaining token-related interface Yes
sign String header Signature calculated by the “after get token” signature algorithm Yes
sign_method String header Digestion algorithm of signature, HMAC-SHA256 Yes
t Long header 13-digit standard time stamp Yes

Request Parameters

Parameter name Type Parameter position Description Required
uid String URI Useruid, placed in uri Yes

Request Example

GET  /v1.0/users/ay1523855071346NGc0j/devices

Return Messages

Parameter name Type Description
code Integer Response code(see error code section for details)
success Boolean Success or failed: (true: success, false: failed)
msg String Request failed message. Empty when successful
result Array User device messages

Result Description

Parameter name Type Description
device_id String DeviceID
name String Device name
functions Array Device function point

Function Description

Parameter name Type Description
code String Function pointcode
value String Value of function point

Return Example


{

"success": true,
"result": [
{
"device_id": "6c362ac3c53fbd6f3ewqfa",
"name": "Set-top box3",
"functions": [
{
"code": "switch_power",
"value": "false"
},
{
"code": "confirm",
"value": "false"
}
]
},
{
"device_id": "6c6ca9545208069126vx1s",
"name": "TV3",
"functions": [
{
"code": "switch_power",
"value": "false"
},
{
"code": "confirm",
"value": "false"
}
]
}
]

}

400 Call

Consult

400-881-8611