Getting blank output in Alerts-Get All API

MD Saif 1 Reputation point
2021-04-01T13:39:02.677+00:00

I am using the below mentioned API to get the cost alerts, but I am getting a blank output.

"GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts?api-version=2019-03-01"

The scope that I am using is at the resource group level (subscriptions/" + subscription_id + "/resourceGroups/" + resource_group_name)

There is a cost alert in Cost Management+Billing -> Cost Alerts, but the API is still giving me a blank output like this :

{
"value": []
}

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,829 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 21,411 Reputation points MVP
    2021-04-01T13:49:14.587+00:00

    Hi,
    The above API is not for cost management alerts. The API for budget alerts is this.

    The above API is for Azure Monitor alerts. Keep in mind that the API is for alert instances not for alert rules, so you need actual alert instances.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.