'How do I specify an alert rule for Azure API management for only a specific API?

I have set up an alert rule in Azure that warns us when the backend returns an error code (4xx or 5xx).

This works but the API Management contains a multitude of APIs.

I thought I would create separate alert rules for each API but there does not seem to be a way to do this via UI. Specifically, there is no condition available that would let me select one or more APIs.

Is there a way to do this programmatically via an ARM template or have I missed anything?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source