Using Billing API of Azure, How We Get Days Wise consummation, using REST API of Azure Account.

manish verma 516 Reputation points
2024-01-02T11:05:10.56+00:00

Hi All,

We need to monitor day wise, service wise Expense of Azure Subscription. Please share with REST API details. also we need to use this REST API in Azure data factory to get the data and store in SQL server for reporting

Thanks a lot for your help

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,673 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,688 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,556 Reputation points Moderator
    2024-01-03T09:42:41.29+00:00

    manish verma, thank you for posting this question here.

    To query cost incurred for the subscription, you may use the Generate Cost Details Report API.

    Note, for subscription level information, you will have to use

    scope - as subscriptionId (ref: Understand and work with scopes)

    and use the timePeriod in the request.

    For more details, see Generate Cost Details Report - Create Operation


    You can also use Exports API, if you need historical information - Tutorial: Seed a historical cost dataset with the Exports API


    For details of getting data from REST API and saving to SQL, review the articles below:

    Copy and transform data from and to a REST endpoint by using Azure Data Factory

    Copy and transform data in Azure SQL Database by using Azure Data Factory or Azure Synapse Analytics

    A tutorial video for Copying REST API data to Azure SQL DB using Azure Data Factory is also posted here - https://www.youtube.com/watch?v=k0Jsb-GUDSg

    For any specific DataFactory related question, please feel free to post a new question with "Azure Data Factory" so that it can come to attention of data factory community too.

    Hope this helps.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.