Obtain function List

Feature Description:

Obtain function list based on category

Interface Address

GET  /v1.0/functions/{category}

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
category String URI Device category Yes

Request Example

GET  /v1.0/functions/kg

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 Object result

Result Description

Parameter name Type Description
category String Device category
functions Array functions set

functions Description

Parameter name Type Description
code String Instruction set name
type String Instruction set type
values String Input parameter range of instruction set

Return Example

{
"success": true,
"t": 1544704458664,
"result": {
"category": "kg",
"functions": [
{
"code": "switch",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_1",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_2",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_3",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_4",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_5",
"type": "Boolean",
"values": "{}"
},
{
"code": "switch_6",
"type": "Boolean",
"values": "{}"
},
{
"code": "countdown_1",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "countdown_2",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "countdown_3",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "countdown_4",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "countdown_5",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "countdown_6",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
}
]
}
}

400 Call

Consult

400-881-8611