SOLVED
Home

Saved Searches API

Daniel Thilagan
New Contributor

When using https://docs.microsoft.com/en-us/rest/api/loganalytics/savedsearches/getresults i receive the following error:

“{"error":{"code":"InvalidOperationArgument","message":"Saved search result not supported for the new query language"}}”

 

I've tried using  API versions “api-version=20150320” and “20170101preview" (dashes removed) and receive the above error.  Is Save Search supported in the new query language; if not, when will the API be updated?

2 Replies
Solution

Hi

I do not have information if such api will be created for the new language but you can get the query programmatically via the api:

https://docs.microsoft.com/en-us/rest/api/loganalytics/savedsearches/get

 

and than execute it via the new api for executing queries:

https://dev.loganalytics.io/documentation/Using-the-API/RequestFormat

 

The latest AzureRM modules also support executing query via the new api:

https://github.com/Azure/azure-powershell/releases/tag/v5.3.0-February2018-rtm

 

Hope this helps a little bit!

 

Thanks - this works! Couple of extra steps but the desired result is achieved.