How to get Azure Iot Edge Module details infomation from rest api that has shown in Iot Edge Module List

Phyo Thant Sin 6 Reputation points
2021-04-13T04:03:58.92+00:00

I'm trying to get the Iot Edge Module information from the rest api. Now I had got the information from following api.
https://fully-qualified-iothubname.azure-devices.net/devices/{id}/modules?api-version=2020-05-31-preview
But it wasn't enough infomation that I wanted. I wanted infos just like attached image.87139-azure-portal-iotedge-device-details.png

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
535 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Sander van de Velde 28,386 Reputation points MVP
    2021-04-13T15:50:05.843+00:00

    Hello @Phyo Thant Sin ,

    you found the module twin

    var url = $"https://{shortIoTHubName}.azure-devices.net/twins/{deviceId}/modules/{moduleId}?api-version=2020-05-31-preview";

    already. This gives eg. the desired properties.

    I guess you want more information about Azure IoT Edge modules like the create options?

    If you check the deployment manifest, this information is found in the desired properties of the edgeAgent:

    87389-image.png

    So, get the module twin of the edgeAgent too and just combine the two results.

    0 comments No comments