0

Tried searching for API as well as SDK in microsoft website but didn't get any specific result. I am trying to create a dashboard for all the availability status of all the application gateway using python and plotly.

This api is not providing the output GET https://management.azure.com//subscriptions/Subs/resourceGroups/Rsg/providers/Microsoft.Network/applicationGateways/appgw/Microsoft.ResourceHealth?api-version=2018-01-01

Ghost rider
  • 43
  • 1
  • 9
  • Can you please include the response you are getting for the Api? – Rukmini Jul 13 '22 at 05:11
  • { "Message": "No HTTP resource was found that matches the request URI 'https://northeurope.network.azure.com:30018/4abbce30-6340-4fed-8600-0e9f690ab6a8/133008651933684680/subscriptions/xyz/resourceGroups/xyz/providers/Microsoft.Network/applicationGateways/xyz/Microsoft.ResourceHealth?api-version=2018-01-01'." } I have replaced the subs , rsg and appgw name with xyz for security reasons. When I check in azure portal the resource health shows available. – Ghost rider Jul 13 '22 at 06:58

1 Answers1

0

You can make use of Postman by creating a service principal like below:

Go to Azure Portal -> Azure Active Directory -> App Registrations -> New Registration

Make sure to add the Api permission like below:

enter image description here

Generate the access token via Postman like below:

enter image description here

To resolve the error, try using POST method instead of GET while calling the query like below:

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth?api-version=2021-08-01

enter image description here

Alternatively, you can make use of below PowerShell command as mentioned in this MsDoc:

Get-AzApplicationGatewayBackendHealth 

Reference:

java - How to check the health of application gateway in Azure by Peter Pan

Rukmini
  • 6,015
  • 2
  • 4
  • 14
  • Hi Rukmini appreciate the solution but I am not looking for the resources in the backend. I want to check application gateway health as a resource , reason being is that if Microsoft is having any maintenance or outage I will like to know if my application gateway is available. The option which I am looking for is when we open any application gateway in portal we have a option at the bottom left for Resource health. – Ghost rider Jul 13 '22 at 07:46