I want to query the Azure IoT hub through a the query endpoint using an http request. Currently I am receiving a Internal Server Error with the following request through Postman:
https://{iothubname.etc}/devices/query?api-version=2020-05-31-preview
with a request body containing {query: "SELECT * FROM devices"}
Directly querying the hub with the query works so I believe that it is valid and other requests are authenticating properly so I am believe that it is a problem with how I am formatting my request.
Can someone point out which part of my requests is causing the issue or provide a working example with the same endpoint?
Thanks!
Note: The documentation for the request can be found here https://learn.microsoft.com/en-us/rest/api/iothub/service/query/get-twins