Get the function list

Feature Description

Get the function list based on the device id

Interface Address

GET  /v1.0/devices/{deviceId}/functions

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
deviceId String URI Deviceid Yes

Request Example

GET  /v1.0/devices/xxxx/functions

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
t Long Timestamp, 13-bit length
result Boolean Modified successfully returns true

Result Description

Parameter name Type Description
category String Equipment category
functions Array Function set

functions Description

Parameter name Type Description
code String Instruction set name
type String Instruction set type
values String Instruction set entry range

Return Example


{
"success": true,
"t": 1544704458664,
"result": {
"category": "kg",
"functions": [
{
"code": "switch_1",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_2",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_3",
"type": "Boolean",
"values": "{}"
}
]
}
}

400 Call

Consult

400-881-8611