Exercise - Test Azure AI services on the IoT Edge device
You'll make an HTTP call to the Azure IoT Edge device that has the Azure AI services container running. The container provides REST-based query prediction endpoint APIs. Use the host, http://<<your-ipaddress>>:5000
, for container APIs.
Open port 5000 of the edge device.
Go to the edge device VM you created in the Azure portal.
Under Networking, select Network settings.
Navigate to Rules section to add an inbound security rule to open port 5000.
Select the Create port rule button and select Inbound port rule.
Set the Destination Port Ranges to 5000
Set the Name to Port_5000
Select the Add button
Copy the public IP address of your edge device from the overview page.
Query the Azure AI services container running on your IoT Edge device from any browser
Request URL | Purpose |
---|---|
http://<<your-ipaddress>>:5000/ |
The container provides a home page. |
http://<<your-ipaddress>>:5000/status |
Requested with an HTTP GET, to validate that the container is running without causing an endpoint query. |
http://<<your-ipaddress>>:5000/swagger |
The container provides a full set of documentation for the endpoints and a Try it out feature. |
- Open the browser, and replace the IP address of edge device with
<<your-ipaddress>>
. - Go to
http://<<your-ipaddress>>:5000
. - Select API Description or go to
http://<<your-ipaddress>>:5000/swagger
to get a detailed description of the API. - Select Try it out and then Execute. You can change the input value as you like. The result shows up farther down on the page.