0
votes

I have been breaking my head on this for a long time now and haven't found the solution yet. I need

  1. Rest api to add an iot device to an iot edge, in azure iot hub.
  2. Rest api to get all iot devices under an iot edge, in azure iot hub.

I scampered through the documentation, but to no vain. Someone please do help, if you are aware of these.

2

2 Answers

0
votes

have a look at the Query POST request with the following payload:

{
  "query":"SELECT * FROM devices WHERE capabilities.iotEdge = true "
}
0
votes

The parameter deviceScope, while adding a device, determines the parent of that particular device. So while adding a device, if you set your device scope to that particular iot edge, then it automatically gets assigned as a child, to the particular iot edge.