Migrate from Azure Enterprise Reporting to Microsoft Cost Management APIs overview

This article helps developers that have built custom solutions using the Azure Enterprise Reporting APIs to migrate to Microsoft Cost Management APIs. Service principal support is available in the newer Cost Management APIs and they are still actively being developed. Consider migrating to them instead of using the older Azure Enterprise Reporting APIs. The older APIs are being deprecated. This article helps you understand the differences between the Azure Enterprise Reporting APIs and the Cost Management APIs, what to expect when you migrate to the Cost Management APIs, and the new capabilities that are available with the Cost Management APIs.

API differences

The following information describes the differences between the older Azure Enterprise Reporting APIs and the newer Cost Management APIs.

Use Azure Enterprise Reporting APIs Microsoft Cost Management APIs
Authentication API key provisioned in the Enterprise Agreement (EA) portal Azure Active Directory (Azure AD) Authentication using user tokens or service principals. Service principals take the place of API keys.
Scopes and permissions All requests are at the enrollment scope. API Key permission assignments will determine whether data for the entire enrollment, a department, or a specific account is returned. No user authentication. Users or service principals are assigned access to the enrollment, department, or account scope.
URI Endpoint https://consumption.azure.com https://management.azure.com
Development status In maintenance mode. On the path to deprecation. In active development
Available APIs Limited to what's currently available Equivalent APIs are available to replace each EA API. Additional Cost Management APIs are also available, including:
- Budgets
- Alerts
- Exports

Migration checklist

  • Familiarize yourself with the Azure Resource Manager REST APIs.
  • Determine which Enterprise Reporting APIs you use and see which Cost Management APIs to move to at Enterprise Reporting API mapping to new Cost Management APIs.
  • Configure service authorization and authentication for the Cost Management APIs. For more information, see Assign permission to ACM APIs.
  • Test the APIs and then update any programming code to replace Enterprise Reporting API calls with Cost Management API calls.
  • Update error handling to use new error codes. Some considerations include:
    • Cost Management APIs have a timeout period of 60 seconds.
    • Cost Management APIs have rate limiting in place. This results in a 429 throttling error if rates are exceeded. Build your solutions so that you don't make too many API calls in a short time period.
  • Review the other Cost Management APIs available through Azure Resource Manager and assess for use later. For more information, see Use additional Cost Management APIs.

Enterprise Reporting API mapping to new Cost Management APIs

Use the following information to identify the Enterprise Reporting APIs that you currently use and the replacement Cost Management API to use instead.

Scenario Enterprise Reporting APIs Cost Management APIs
Migrate from EA Usage Details APIs /usagedetails/download
/usagedetails/submit
/usagedetails
/usagedetailsbycustomdate
Use Microsoft.CostManagement/Exports for all recurring data ingestion workloads.
Use the Cost Details report for small on-demand datasets.
Migrate from EA Balance Summary APIs /balancesummary Microsoft.Consumption/balances
Migrate from EA Price Sheet APIs /pricesheet For negotiated prices, use Microsoft.Consumption/pricesheets/default
For retail prices, use Retail Prices API
Migrate from EA Reserved Instance Usage Details API /reservationdetails Microsoft.CostManagement/generateReservationDetailsReport
Migrate from EA Reserved Instance Usage Summary APIs /reservationsummaries Microsoft.Consumption/reservationSummaries
Migrate from EA Reserved Instance Recommendations APIs /SharedReservationRecommendations
/SingleReservationRecommendations
Microsoft.Consumption/reservationRecommendations
Migrate from EA Reserved Instance Charges APIs /reservationcharges Microsoft.Consumption/reservationTransactions

Use additional Cost Management APIs

After you've migrated to the Cost Management APIs for your existing reporting scenarios, you can use many other APIs, too. The APIs are also available through Azure Resource Manager and can be automated using service principal-based authentication. Here's a quick summary of the new capabilities that you can use.

  • Budgets - Use to set thresholds to proactively monitor your costs, alert relevant stakeholders, and automate actions in response to threshold breaches.
  • Alerts - Use to view alert information including, but not limited to, budget alerts, invoice alerts, credit alerts, and quota alerts.
  • Exports - Use to schedule recurring data export of your charges to an Azure Storage account of your choice. It's the recommended solution for customers with a large Azure presence who want to analyze their data and use it in their own internal systems.

Next steps