You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cost-management-billing/costs/migrate-cost-management-api.md
+18-63Lines changed: 18 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.reviewer: micflan
14
14
15
15
This article helps you understand the data structure, API, and other system integration differences between Enterprise Agreement (EA) and Microsoft Customer Agreement (MCA) accounts. Cost Management supports APIs for both account types. Review the [Setup billing account for](../manage/mca-setup-account.md) Microsoft Customer Agreement article before continuing.
16
16
17
-
Organizations with an existing EA account should review this article in conjunction with setting up an MCA account. Previously, renewing an EA account required some minimal work to move from an old enrollment to a new one. However, migrating to an MCA account requires additional effort. Additional effort is because of changes in the underlying billing subsystem, which affect all cost-related APIs and service offerings.
17
+
Organizations with an existing EA account should review this article when they set up an MCA account. Previously, renewing an EA account required some minimal work to move from an old enrollment to a new one. However, migrating to an MCA account requires extra effort. Extra effort is because of changes in the underlying billing subsystem, which affect all cost-related APIs and service offerings.
18
18
19
19
## MCA APIs and integration
20
20
@@ -38,7 +38,7 @@ The following items help you transition to MCA APIs.
38
38
- Update any programming code to [use Azure AD authentication](/rest/api/azure/#create-the-request).
39
39
- Update any programming code to replace EA API calls with MCA API calls.
40
40
- Update error handling to use new error codes.
41
-
- Review additional integration offerings like Power BI for other needed action.
41
+
- Review other integration offerings like Power BI for other needed action.
42
42
43
43
## EA APIs replaced with MCA APIs
44
44
@@ -47,9 +47,9 @@ EA APIs use an API key for authentication and authorization. MCA APIs use Azure
47
47
| Purpose | EA API | MCA API |
48
48
| --- | --- | --- |
49
49
| Balance and credits |[/balancesummary](/rest/api/billing/enterprise/billing-enterprise-api-balance-summary)| Microsoft.Billing/billingAccounts/billingProfiles/availableBalanceussae |
@@ -98,7 +98,7 @@ To get available balances with the Available Balance API:
98
98
99
99
## APIs to get cost and usage
100
100
101
-
Get a daily breakdown of costs from Azure service usage, third-party Marketplace usage, and other Marketplace purchases with the following APIs. The following separate APIs were merged for Azure services and third-party Marketplace usage. The old APIs are replaced by the [Microsoft.Consumption/usageDetails](/rest/api/consumption/usagedetails) API. It adds Marketplace purchases, which were previously only shown in the balance summary to date.
101
+
Get a daily breakdown of costs from Azure service usage, third-party Marketplace usage, and other Marketplace purchases with the following APIs. The following separate APIs were merged for Azure services and third-party Marketplace usage. The old APIs are replaced by either [Exports](ingest-azure-usage-at-scale.md) or the [Cost Details API](/rest/api/cost-management/generate-cost-details-report/create-operation). To choose the solution that's right for you, see [Choose a cost details solution](../automate/usage-details-best-practices.md). Both solutions provide the same Cost Details file and have marketplace purchases in the data, which were previously only shown in the balance summary to date.
@@ -107,68 +107,23 @@ Get a daily breakdown of costs from Azure service usage, third-party Marketplace
107
107
-[Get marketplace store charge/marketplacecharges](/rest/api/billing/enterprise/billing-enterprise-api-marketplace-storecharge)
108
108
-[Get marketplace store charge/marketplacechargesbycustomdate](/rest/api/billing/enterprise/billing-enterprise-api-marketplace-storecharge)
109
109
110
-
All Consumption APIs are replaced by native Azure APIs that use Azure AD for authentication and authorization. For more information about calling Azure REST APIs, see [Getting started with REST](/rest/api/azure/#create-the-request).
111
-
112
-
All the preceding APIs are replaced by the Consumption/Usage Details API.
113
-
114
-
To get usage details with the Usage Details API:
115
-
116
-
| Method | Request URI |
117
-
| --- | --- |
118
-
| GET |`https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2019-01-01`|
110
+
Exports and the Cost Details API, as with all Cost Management APIs, are available at multiple scopes. For invoiced costs, as you would traditionally receive at an enrollment level, use the billing profile scope. For more information about Cost Management scopes, see [Understand and work with scopes](understand-work-scopes.md).
119
111
120
-
The Usage Details API, as with all Cost Management APIs, is available at multiple scopes. For invoiced costs, as you would traditionally receive at an enrollment level, use the billing profile scope. For more information about Cost Management scopes, see [Understand and work with scopes](understand-work-scopes.md).
| Resource group | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName} |
163
118
164
-
The property name containing the array of usage records changed from data to _values_. Each record used to have a flat list of detailed properties. However, each record now all details are now in a nested property named _properties_, except for tags. The new structure is consistent with other Azure APIs. Some property names have changed. The following table shows corresponding properties.
119
+
Some property names have changed in the new Cost Details dataset available through Exports and Cost Details API. The following table shows corresponding properties.
165
120
166
121
| Old property | New property | Notes |
167
122
| --- | --- | --- |
168
123
| AccountId | N/A | The subscription creator isn't tracked. Use invoiceSectionId (same as departmentId). |
169
124
| AccountNameAccountOwnerId and AccountOwnerEmail | N/A | The subscription creator isn't tracked. Use invoiceSectionName (same as departmentName). |
170
125
| AdditionalInfo | additionalInfo ||
171
-
| ChargesBilledSeparately | isAzureCreditEligible |Note that these properties are opposites. If isAzureCreditEnabled is true, ChargesBilledSeparately would be false. |
126
+
| ChargesBilledSeparately | isAzureCreditEligible |The properties are opposites. If isAzureCreditEnabled is true, ChargesBilledSeparately would be false. |
Make another GET call to the location. The response to the GET call is the same until the operation reaches a completion or failure state. When completed, the response to the GET call location returns the download URL. Just as if the operation was executed at the same time. Here's an example:
298
+
Make another GET call to the location. The response to the GET call is the same until the operation reaches a completion or failure state. When completed, the response to the GET call location returns the download URL as if the operation was executed at the same time. Here's an example:
344
299
345
300
```
346
301
HTTP Status 200
@@ -391,7 +346,7 @@ Instead of the above API endpoints, use the following ones for Microsoft Custome
391
346
392
347
**Price Sheet API for Microsoft Customer Agreements (asynchronous REST API)**
393
348
394
-
This API is for Microsoft Customer Agreements and it provides additional attributes.
349
+
This API is for Microsoft Customer Agreements and it provides extra attributes.
395
350
396
351
**Price Sheet for a Billing Profile scope in a Billing Account**
397
352
@@ -458,7 +413,7 @@ The following fields are either not available in Microsoft Customer Agreement Pr
458
413
| unit | Not applicable. Can be parsed from unitOfMeasure. |
459
414
| currencyCode | Same as the pricingCurrency in MCA. |
460
415
| meterLocation | Same as the meterRegion in MCA. |
461
-
| partNumber partnumber | Not applicable because part number isn't listed in MCA invoices. Instead of part number, use the meterId and productOrderName combination to uniquely identify prices. |
416
+
| partNumber | Not applicable because part number isn't listed in MCA invoices. Instead of part number, use the meterId and productOrderName combination to uniquely identify prices. |
0 commit comments