//Cloud notes from my desk -Maheshk

"Fortunate are those who take the first steps.” ― Paulo Coelho

[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

2017-04-28 - Posted by | Azure, Billing, PaaS |

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: