Execute Device Capability

Last Updated on : 2022-11-11 03:43:37

Execute a specified device capability based on the device ID and capability code.

API address

POST: /v1.0/iot-03/devices/{device_id}/capabilities/{capability_code}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
capability_codeStringuritrueThe code of a specified capability.

Description of body

Parameter nameTypeINRequiredDescription
valueObject trueThe command value.

Return parameter

Parameter nameTypeDescription
resultBooleanThe execution result.

Request example

POST: /v1.0/iot-03/devices/64***dz/capabilities/bright_value

Return example

{
    "result": true,
    "t": 1644547712457,
    "success": true
}

Error code

For more information, see error code.