Compartilhar via


[Azure Billing] Sample REST API postman request

Azure Billing REST API helps to predict and manage Azure costs.  Following API's are there to query the billing data.

1) Resource Usage (Preview)

Get consumption data for an Azure subscription- https://msdn.microsoft.com/en-us/library/azure/mt219001.aspx

Sample working query:-
https://management.azure.com/subscriptions/your-subscription-id/providers/Microsoft.Commerce/UsageAggregates?api-version=2015-06-01-preview&reportedStartTime=2014-05-01T00%3a00%3a00%2b00%3a00&reportedEndTime=2017-04-01T00%3a00%3a00%2b00%3a00&aggregationGranularity=Daily&showDetails=false

image

2) Resource RateCard (Preview)

Get price and metadata information for resources used in an Azure subscription- https://msdn.microsoft.com/en-us/library/azure/mt219004.aspx

Sample working query:-
https://management.azure.com/subscriptions/your-subscription-id/providers/Microsoft.Commerce/RateCard?api-version=2016-08-31-preview&$filter=OfferDurableId eq 'MS-AZR-0063P' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'

image

 

Ps:- Assuming you have a valid bearer token for authorization.

https://docs.microsoft.com/en-us/rest/api/index?redirectedfrom=MSDN#send-the-request