Publish direct methods
To invoke a direct method in devices:
-
Device should subscribe to the topic
$iothub/methods/POST/#. -
Invoke a direct method using the Direct method invocation API.
{"name": "Reboot","payload": {"frequency": 10},"responseTimeoutInSecs": 10} -
The device will get notifications in the topic
$iothub/methods/POST/Reboot/?$rid=1. -
The device should respond to the request within the response time out in the topic
$iothub/methods/res/200/?$rid=1. Set the requestId from the notification topic.