I am trying to fetch metric values for a vm using below rest API :
https://management.azure.com/subscriptions/aac11d2f-f03b-454e-9f65-4eb00795f964/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/ubuntu/metrics?api-version=2014-04-01&$filter=%28name.value%20eq%20%27\Memory\Availableand%20timeGrain%20eq%20duration%27PT1M%27%20and%20startTime%20eq%202016-02-18T20%3A26%3A00.0000000Z%20and%20endTime%20eq%202016-03-23T21%3A26%3A00.0000000Z
But it is giving me an bad request URL. can any one help me out from this.
Finally got API's to list the azure resource metrics sharing link of rest API's:
https://msdn.microsoft.com/en-us/library/azure/mt743622.aspx
If you want to get the VM metrics from Azure Platform, you could follow these document.
Using Azure Storage service to storage your metrics and get metrics using storage SDK or Rest API whatever you used the classic mode or Resource Group Mode.
Please refer to official document about how to enable the diagnostics settings on Azure Portal :
https://azure.microsoft.com/en-in/blog/windows-azure-virtual-machine-monitoring-with-wad-extension/
and how to use Azure storage REST API (https://msdn.microsoft.com/en-us/library/azure/dd179355.aspx) and SDK (https://github.com/Azure?utf8=%E2%9C%93&query=storage )
From your description, it seems that you used the Application Insight service to show your metrics on Azure. Actually, base on my experience, Application Insight service is in preview and it is design for your live App on Azure platform such as Web App, Android App and soon on.