Kindly help me with the list of APIs and the schema to restart a device. Starting with getting a device ID form name, authenticating and then restarting the device.
Hi @siddharthmunot,
The following API will help you with login and getting a JWT to make API calls securely - Need the credentials . Post that , you can use the following API to restart a device that is currently online :
URL : /dm/api/dm/v1/device/command
Method : POST
Payload :
{
"command": "reboot",
"deviceid": ["86d6794a-7afe-45ce-a35e-58114d053bad"],
"param": "NULL"
}
where 86d6794a-7afe-45ce-a35e-58114d053bad
is the deviceid
of the device . You can get this value from the URL of a device which is opened in the UI . Ex : https://x.x.x.x/device/86d6794a-7afe-45ce-a35e-58114d053bad/info
Thanks, Prashanth this helps. What API should I call to retrieve DeviceID using Device name?
The following API should help https://experience.aikaan.io/api-doc/?urls.primaryName=DeviceManagement#/Device/httpGetSearchedDeviceListRequest . Enter the device name under search_key
Great. Thanks much Prashanth