I am calling this API - POST https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01
with the JSON body as :
{
"subscriptions": [
"subscription id"
],
"query": "Resources | summarize count()"
}
But I am getting this response :
{
"totalRecords": 1,
"count": 1,
"data": {
"columns": [
{
"name": "count_",
"type": "integer"
}
],
"rows": [
[
0
]
]
},
"facets": [],
"resultTruncated": "false"
}
But in the Azure Resource Graph Explorer(in portal) I am able to get the count properly.
Please help me with this issue.
Thanks