Control Devices by Traits
POST/devices/trait/execute
Control devices by traits. You can perform the following operations:
- Update device attributes (such as switch, temperature, etc. For functionCode and traitCode, please refer to the /devices/definitions interface)
- Reconnect device to a new room (functionCode="EndpointLabel", traitCode="EndpointRoom")
- Rename device (functionCode="EndpointLabel", traitCode="EndpointName")
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
Request succeeded. However, it does not mean all trait values were set successfully.
A code value of 0 indicates that at least some operations succeeded; a non-zero code indicates all failed.
If data is present, it indicates the set of traits that failed to be set; if not, all traits were set successfully.
Request Parameter Error
Unauthorized or Authentication Expired
No Permission to Access
Resource Not Found
Too Many Requests
Internal Server Error