Search code examples
azuremetricsquotaazure-appservice

Retrieve quota for Microsoft Azure App Service Storage


How to retrieve an Azure App Service storage capacity?

The "Quotas" menu shows me 52% "File system storage" is used, but I am not able to either any of this

  • find any condition in alert rule
  • api to retrieve this metric
  • C# code, to find the limit by code

Solution

  • The Azure App Service Plan's "List Usage" API works with an oAuth2.0 Rest API which can be tried out here: https://learn.microsoft.com/en-us/rest/api/appservice/appserviceplans/listusages

    Security: Azure Active Directory OAuth2 Flow Type: oauth2 Flow: implicit Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

    Details are: URL: https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Web/serverfarms//usages?api-version=2019-08-01

    Filters can be added with ODATA syntax: https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Web/serverfarms//usages?$filter=name.value eq 'FileSystemStorage'&api-version=2019-08-01

    enter image description here