Last Updated on : 2024-06-21 07:11:58download
This topic describes how to use Postman to make API requests and control devices. A robot vacuum is used as an example in this topic.
Get a token.
Call the Get access_token with simple mode operation to get the value of access_token. The value is required when you call API operations to control devices.
Call the Get the function list operation to get the instruction set that is supported by the device. You can use the instruction set to control the device.
Call the Send device commands operation to control the device. You can send a command that is supported by the device to achieve the required effect.
Note: For more information, see API Reference.
The following code block in the API request body shows how to start a robot vacuum:
{
"commands":[
{
"code": "power",
"value":true
}
]
}
The robot vacuum is started to run as expected.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback