Posts

Showing posts from September, 2019

How to get Azure Storage metrics through REST API?

Image
I have spent sometime on getting Storage Metrics from Azure REST APIs. Though Azure documentation is a bit tricky at first instance. I was able to figure out Storage space utilized under each of the storage account. Note: Below storage metrics are at Storage Account/Blog/Table/Queue level. AVAILABILITY : The following example shows how to read metric data at account level: GET "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/providers/microsoft.insights/metrics?metricnames=Availability&api-version=2018-01-01&aggregation=Average" Response: { "cost": 0, "timespan": "2017-09-07T17:27:41Z/2017-09-07T18:27:41Z", "interval": "PT1H", "value": [ { "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Stor