How to get outstanding balance with Azure billing API

I have to display outstanding balance for a Azure subscription. Currently I am using Resource Usage API (Preview) and Resource RateCard API(Preview) which is giving me very large detailed data for Rate for each meter and its usage. As per this article, I've to multiply Rate card details with the Usage Details.

As in my case, I've to show only outstanding balance lets say 500 USD, and what I am currently getting is rate card and usage details which is not what I am looking for

Is there any way (API) where I can directly get the outstanding balance?

Calling Usage API:

string requesturl = String.Format("https://management.azure.com/subscriptions/{0}/providers/Microsoft.Commerce/

UsageAggregates?api-version=2015-06-01-preview&reportedstartTime=

2015-05-15+00%3a00%3a00Z&reportedEndTime=2015-05-16+00%3a00%3a00Z", subscriptionId);


Calling RateCard API:

string requesturl = String.Format("{0}/{1}/{2}/{3}","https://management.azure.com",
                   "subscriptions",
                   subscriptionId,
                   "providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq 'MS-AZR-0121p' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'");
September 4th, 2015 3:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics