I wrote a few articles that discuss how and or why you would need to know the apiVerion api-version when calling Azure REST APIs or making a deployment with an Azure Resource Manager (ARM) template.
- Azure Function 400 Bad Request
- How to disable/enable HTTP/2, Azure App Service
- Using Postman to call Azure REST APIs
- Make changes to Azure App Service setting using Postman
If you are getting errors, you might want to use a more current or a different API Version to see if it then works, but how to find them? Look no further. There are 2 approaches I recommend:
I wrote this article “How to set Azure PowerShell to a specific Azure Subscription” that explains how to login and set your azure subscription using Azure PowerShell so I will not cover that again.
To get a list of available providers, execute the following cmdlet after logging in.
You should see output similar to the following, Figure 1.
Figure 1, azure PowerShell finding resource providers
Then, find the ProviderNamespace for which you want the the apiVersion for and execute the following cmdlet, assume we want the apiVersion for Microsoft.Web.
((Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Web).ResourceTypes | Where-Object ResourceTypeName -eq sites).ApiVersions
And you should see the output similar to Figure 2.
Figure 2, azure PowerShell finding resource providers and api versions
Then you can try the newest or different one.
This is a cool tool –> https://resources.azure.com
Select the AAD tenant, the Subscription then providers. Search for your desired provider and you will see the same values, see Figure 3.
Figure 3, use resource explorer or azure PowerShell finding resource providers and api versions