Open adactitsla opened 7 years ago
@haitch Hey Haitao, would you mind taking a look at this issue?
What is the status on this feature request. I'm having exactly the same problem with our Splunk Microsoft OMS application. Making the REST API query, I'll get the same body
Request:
Update | where Type=="Update"
Request body:
{'top': '1000', 'query': "Update | where Type=='Update' ", 'start': '2018-04-18T15:28:27', 'end': '2018-04-19T10:40:29'}
Response body:
{ "__metadata": { "resultType": "error" }, "error": { "type": "QuerySyntax", "message": "Invalid syntax.", "line": 1, "column": 36, "text": "=" } }
Note: I tried a couple of variants with only one "=" sign and \" and \' and so on. same result. What am I missing ? The rest api doesn't like "==" and "sort by ..." and "order by ..."
NOTE: solved it by writing
Type="Update" | sort TimeGenerated asc
@FirestormAngel if you're not specifically targeting saved searches, you can use Invoke-AzureRmOperationalInsightsQuery to use Kusto query language. Otherwise, probably the REST API for saved search is currently your best bet.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzmonLogA.
Cmdlet(s)
PowerShell Version
Module Version
OS Version
BuildVersion 10.0.15063.502
Description
Both Get-AzureRmOperationalInsightsSearchResults and Get-AzureRmOperationalInsightsSavedSearch doesn't support the Kusto query language, even though the OMS/Log Analytics workspace has been upgraded.
I run the following command to pull data from a upgraded OMS workspace:
I receive this message:
If I run the same cmdlet with the native query.
I get this result:
Debug Output
Script/Steps for Reproduction