For the three Azure API endpoints given below, we have found some discrepancies in the API versions where some versions seem to be misrepresented in the documentation as well as undocumented API versions which seem more recent. We would like to confirm with Microsoft Azure team on which API versions to use.
The API endpoints in question are as follows -
Get resources list (Resources - Resources - REST API (Azure Azure Resource Graph) - https://learn.microsoft.com/en-us/rest/api/azureresourcegraph/resourcegraph(2020-04-01-preview)/resources/resources?tabs=HTTP
Get Metric Definitions list (Metric Definitions - List - REST API (Azure Monitor) - https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list?tabs=HTTP
Get metrics data (Metrics - List - REST API (Azure Monitor) - https://learn.microsoft.com/en-us/rest/api/monitor/metrics/list?tabs=HTTP
Regarding the API endpoint Get resources list , according to the Microsoft Learn (https://learn.microsoft.com/en-us/rest/api/azureresourcegraph/resourcegraph(2020-04-01-preview)/resources/resources?tabs=HTTP) the latest api version is 2020-04-01-preview. When running a request using postman it resulted us with the list of supported api versions in the response which are not mentioned in the Microsoft Learn.
To summarise, the latest api version according to the doc is 2020-04-01-preview and latest api version using the postman request is 2022-10-01 (undocumented) for getting list of resources.
Similar is the case for the other two endpoints as well. The latest api version according to the doc is 2018-01-01 and latest api version using the postman request is 2021-05-01 for getting list of Metric Definitions and metrics data as well.
So, it seems like there are more recent but undocumented APIs from Azure. And the one with preview just sounds like a documentation error. We want to confirm the actual version with the Azure team.