Forum Discussion
Log Analytics ARM REST API specification update
Hi,
The ScheduledQueryRules API guide is live, see examples: https://docs.microsoft.com/en-us/rest/api/monitor/scheduledqueryrules/createorupdate#examples
An official announcement of the API is expected in Jan 2019, but you can already use it.
HTH,
Noa
Hey,
I have similar problem.
Link is for ScheduledQueryRules from provider microsoft.insights, and we are searching under provider Microsoft.OperationalInsights for QueryRules. ScheduledQueryRules and QueryRules are two different things.
I need this to modify Query Rules (not ScheduledQueryRules) to Log Analytics in Azure Monitor. Alerts are using data from Microsoft.OperationalInsights/workspaces/savedSearches/ , Microsoft.OperationalInsights/workspaces/savedSearches/schedules/ and Microsoft.OperationalInsights/workspaces/savedSearches/schedules/actions. API is documented only for Microsoft.OperationalInsights/workspaces/savedSearches/.
I asked a question about the documentation and future of the Microsoft.OperationalInsights and microsoft.insights API on the Azure Advisor platform, but no one has answered me yet. Maybe you'll help :)
- hsakohJan 02, 2019Copper Contributor
Thanks for response.
I thought that scheduledQueryRules is an alert only on the Application Insights,
but As I read the presented document, scheduledQueryRules seemed to be able to target LogAnalytics.In my guess, will savedSearches be abolished and integrated into scheduledQueryRules?
If savedSearches is to be abolished, I will move to scheduledQueryRules.Anyway, next week, if I have time, I will try it.
- pawelliebichJan 02, 2019Copper Contributor
Sadly scheduledQueryRules don't work with a custom query to Log Analytics.
BTW. This can help https://docs.microsoft.com/en-us/azure/azure-monitor/platform/api-alerts
Its little bit outdated with schema but method there are working fine. Just do GET there and you will have a schema.
- Jan 07, 2019
The new API works as Noa stated. The benefits of that new API are:
- alignment with Application Insights
- No need to do saved query to create alert. Now with single resource deployment you create the whole alert.
- The alert is detached from the Log Analytics workspace resource