Questions tagged [azure-billing-api]

Use this tag for questions related to Azure Billing APIs, which is used to pull usage and resource data into your preferred data analysis tools. The Azure Resource Usage and RateCard APIs can help you accurately predict and manage your costs. The APIs are implemented as a Resource Provider and part of the family of APIs exposed by the Azure Resource Manager.

Useful Links:

  1. MSDN
  2. Documentation
  3. Code samples - Github
120 questions
1
vote
1 answer

How to know remaining balance for Azure subscription? (Remaining = Credits - Usage)

I am able to consume the Azure REST APIs - RateCard & Usage. Using combination of above APIs, I am able to calculate the cost of Consumption(usage). To find the Credits, it was mentioned here, first, you would need to find the total credits…
Zahir Firasta
  • 533
  • 6
  • 12
1
vote
1 answer

Get-AzureRmConsumptionUsageDetail not returning data this week

We burn through about $2,500 / month in Azure services, meaning we have plenty of services that we are getting billed for each day. I use the Azure Powershell command Get-AzureRmConsumptionUsageDetail to get my billing data each day. For billing…
Terrence
  • 2,732
  • 2
  • 18
  • 12
1
vote
1 answer

Azure billing API javascript returns CORS error but not when using postman

I am at a loss now. I am trying to reach the Azure Billing & Usage API via my php application, but keep getting the following error: XMLHttpRequest cannot load https://ea.azure.com/rest/{agreementnumber}/usage-reports. Response to preflight…
Stephan212
  • 41
  • 8
1
vote
1 answer

Partner Center rest api 401 error

I tried to use partnercenter api to get the billing details. But API call return 401 error code. the details provided on partnercpi are correct one and its working fine If I give it as input for Subscription API. URL : …
KMG
  • 889
  • 2
  • 14
  • 36
1
vote
1 answer

How to get 'credit available' and 'days remain' using Azure Billing API?

Is it possible to get the two indicators of the old management portal using the Azure Billing or RateCard API like shown below? thank you!
1
vote
1 answer

Azure : Resource usage API issue

I tried to pull the Azure resource usage data for billing metrics. I followed the steps as mentioned in the blog to get Usage data of resources. https://msdn.microsoft.com/en-us/library/azure/mt219001.aspx Even If I set "start and endtime" …
KMG
  • 889
  • 2
  • 14
  • 36
1
vote
0 answers

Azure - API to fetch current charges and billing cycle

We can view the breakdown of the current charges from the Azure portal and the burn rate. Is there any API (apart from the RateCard and Utilization api) to fetch that? Instead of us calculating the cost, can we just fetch the actual cost per…
aaa
  • 1,114
  • 12
  • 19
1
vote
0 answers

Azure CLI - Get RateCard Information

I can get RateCard information from Azure's REST API documented here: https://msdn.microsoft.com/en-us/library/azure/mt218998.aspx Is it possible to get the same information using Azure's command line interface? From my research, I've only seen a…
PV123
  • 11
  • 3
1
vote
2 answers

Azure Billing API: what exact details are required to be entered

Sorry for asking a very lame question here. The API sample code is very much descriptive no doubt. But the build fails for me everytime i run it. the error says "error CS1029: #error: 'Please update the appSettings section in app.config, then…
RZKjr
  • 11
  • 1
1
vote
1 answer

Azure Billing API in Python - Empty Response

I'm trying to build a (what I thought would be) a simple script in Python to download Microsoft's Azure's rate card using the Billing API. token_response = adal.acquire_token_with_client_credentials( 'https://login.microsoftonline.com/' +…
ogre
  • 21
  • 3
1
vote
2 answers

Which Date to use while generating Azure Bill programmatically using Billing APIs

There are two types of times with the Chargeback reporting data: Processing Date: Also known as Reported date. It is the Date on which the data is reported in the Azure system. Usage Start and End Date: This is the actual date when the resource was…
Aman Sharma
  • 1,930
  • 1
  • 17
  • 31
1
vote
1 answer

How to find Uniqueness in Azure Usage Records from Billing APIs

I am building an Azure Chargeback solution and for that I am pulling the Azure Usage data from Azure Billing REST APIs for multiple subscriptions and different dates. I need to store this into custom MS SQL database as per customer’s requirements. I…
Aman Sharma
  • 1,930
  • 1
  • 17
  • 31
1
vote
2 answers

Azure Billing API gives me only 7 days of data

Is there any restriction on the date range to use the Azure Billing API? I'm requesting a month's worth of data but I only get the first 7 days of that range... I use a request like the one…
David Aleu
  • 3,922
  • 3
  • 27
  • 48
1
vote
1 answer

How to get regionInfo for a subscription from Azure usage API?

The rate card API for Microsoft Azure's billing API: https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/RateCard?api-version={api-version}&$filter=OfferDurableId eq ’{OfferDurableId}’ and Currency lt…
jobin
  • 2,600
  • 7
  • 32
  • 59
0
votes
1 answer

get-azconsumptiondetails won't work for some resources

I'm using get-azconsumptionusagedetails in Powershell to get consumption of all of the resources for azure sponsorship acc, but for some of the resources it won't show anything (no error either), even though they are in the same RG as the ones that…