Skip to content

Commit 746667c

Browse files
author
Maddie Minnick
committed
fixed review comments
1 parent b882f22 commit 746667c

File tree

2 files changed

+35
-18
lines changed

2 files changed

+35
-18
lines changed

articles/cost-management-billing/manage/review-enterprise-billing.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,34 @@ This asynchronous API allows you to generate and download cost reports for your
2020

2121
In this article, you learn to retrieve the billing information associated with EA billing accounts, departments, or enrollment accounts using the Cost Details API.
2222

23+
> [!TIP]
24+
> This REST API is ideal for automation scenarios where you need to programmatically retrieve cost data on a regular basis. You can integrate it into scripts, applications, or automated workflows to pull cost reports for analysis, budgeting, or compliance reporting.
25+
2326
> [!IMPORTANT]
24-
> The Cost Details API is asynchronous and report-based. You submit a request to generate a report, poll for its completion, and then download the resulting file from a secure URL.
27+
> The Cost Details API is asynchronous and report-based. You submit a request to generate a downloadable file (report), poll for its completion, and then download the resulting file from a secure URL.
2528
2629
## How the Cost Details API works
2730

2831
The Cost Details API uses an asynchronous workflow:
2932

30-
1. **Create a report**: Submit a POST request to generate a cost details report for your EA scope
33+
1. **Create a report**: Submit a POST request to generate a Cost Details report for your EA scope
3134
2. **Poll for status**: Check the operation status until the report is complete
3235
3. **Download the report**: Use the provided download URL to get the CSV file with your cost data
3336

3437
> [!NOTE]
35-
> The API supports both **ActualCost** and **AmortizedCost** metrics. ActualCost shows charges as they were billed, while AmortizedCost spreads reservation and savings plans purchases across their term and reallocates costs to the resources that used the reservation or savings plan. For example, a $365 reservation purchase appears as $1.00 daily charges in amortized cost view.
38+
> The API supports both **ActualCost** and **AmortizedCost** metrics. ActualCost shows charges as they were billed, while AmortizedCost spreads reservation and savings plans purchases across their term and reallocates costs to the resources that used the reservation or savings plan. For example, a 1-year reservation costing $365 will appear in ActualCost as a single charge on the purchase date. In AmortizedCost, that same $365 is spread out as a daily $1.00 charge across the usage that benefits from the reservation.
3639
3740
## Working with different EA scopes
3841

3942
The Cost Details API supports three EA scopes, each providing different levels of cost aggregation:
4043

4144
- **Billing account scope**: Cost details for the entire EA billing account
4245
- **Department scope**: Cost details aggregated for all accounts in a specific department
43-
- **Enrollment account scope**: Cost details for a specific enrollment account
46+
- **Enrollment account scope**: Cost details for a specific account within an enrollment
4447

4548
## Step 1: Create a cost details report
4649

47-
Submit a POST request to generate a cost details report:
50+
Submit a POST request to generate a Cost Details report:
4851

4952
```http
5053
POST https://management.azure.com/providers/Microsoft.Billing/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2025-03-01
@@ -91,8 +94,8 @@ The request body supports the following parameters:
9194

9295
- **metric** - The type of report requested. Can be either `ActualCost` or `AmortizedCost`. If not specified, defaults to `ActualCost`.
9396
- **timePeriod** - The requested date range for your data. Specify `start` and `end` dates in YYYY-MM-DD format. Can't be used alongside invoiceId or billingPeriod parameters.
94-
- **invoiceId** - The requested invoice for your data. This parameter is only used by Microsoft Customer Agreement customers and can only be used at the Billing Profile or Customer scope. Can't be used alongside billingPeriod or timePeriod parameters.
95-
- **billingPeriod** - The requested billing period for your data. This parameter is only used by Enterprise Agreement customers. Use the YearMonth format (for example, 202408). Can't be used alongside invoiceId or timePeriod parameters.
97+
- **invoiceId** - The requested invoice for your data. This parameter is supported for Microsoft Customer Agreement customers at the Billing Profile or Customer scope. Can't be used alongside billingPeriod or timePeriod parameters.
98+
- **billingPeriod** - The requested billing period for your data. This parameter is supported for Enterprise Agreement customers. Use the YearMonth format (for example, 202408). Can't be used alongside invoiceId or timePeriod parameters.
9699

97100
> [!NOTE]
98101
> If none of the timePeriod, invoiceId, or billingPeriod parameters are provided in the request body, the API returns the current month's cost.
@@ -119,7 +122,18 @@ The initial POST request returns status code 202 (Accepted) with response header
119122

120123
When the report is complete, the polling endpoint returns status code 200 (OK) with the report details, including a `blobLink` for downloading the CSV file.
121124

122-
## Cost details file fields
125+
### Key response fields
126+
127+
|Response property|Description|
128+
|----------------|----------|
129+
|**status** | Status of the report generation (InProgress, Completed, Failed) |
130+
|**dataFormat** | Format of the generated report (CSV) |
131+
|**blobCount** | Number of blob files in the report dataset |
132+
|**byteCount** | Total size of the report dataset in bytes |
133+
|**blobLink** | Download URL for the Cost Details CSV file |
134+
|**validTill** | Expiration date/time for the download URL |
135+
136+
## Cost Details file fields
123137

124138
The downloaded CSV file contains detailed cost and usage data with key fields including:
125139

@@ -146,4 +160,4 @@ For a complete list of all fields and their descriptions, see [Understand cost d
146160
- [Get started with Azure REST API](/rest/api/azure/)
147161
- [Learn more about the Cost Details API](/rest/api/cost-management/generate-cost-details-report)
148162
- [Get small cost datasets on demand](../automate/get-small-usage-datasets-on-demand.md)
149-
- [Understand cost details fields](../automate/understand-usage-details-fields.md)
163+
- [Understand Cost Details fields](../automate/understand-usage-details-fields.md)

articles/cost-management-billing/manage/review-subscription-billing.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,24 @@ The Cost Details API, in particular, helps you review and manage your Azure cost
1919

2020
This asynchronous API allows you to generate and download cost reports for your subscription.
2121

22-
Here, you learn to use the Cost Details API to return subscription billing details for a given date range.
22+
In this article, you learn to use the Cost Details API to return subscription billing details for a given date range.
23+
24+
> [!TIP]
25+
> This REST API is ideal for automation scenarios where you need to programmatically retrieve cost data on a regular basis. You can integrate it into scripts, applications, or automated workflows to pull cost reports for analysis, budgeting, or compliance reporting.
2326
2427
> [!IMPORTANT]
25-
> The Cost Details API is asynchronous and report-based. You submit a request to generate a report, poll for its completion, and then download the resulting file from a secure URL.
28+
> The Cost Details API is asynchronous and report-based. You submit a request to generate a downloadable file (report), poll for its completion, and then download the resulting file from a secure URL.
2629
2730
## How the Cost Details API works
2831

2932
The Cost Details API uses an asynchronous workflow:
3033

31-
1. **Create a report**: Submit a POST request to generate a cost details report for your subscription
34+
1. **Create a report**: Submit a POST request to generate a Cost Details report for your subscription
3235
2. **Poll for status**: Check the operation status until the report is complete
3336
3. **Download the report**: Use the provided download URL to get the CSV file with your cost data
3437

3538
> [!NOTE]
36-
> The API supports both **ActualCost** and **AmortizedCost** metrics. ActualCost shows charges as they were billed, while AmortizedCost spreads reservation and savings plans purchases across their term and reallocates costs to the resources that used the reservation or savings plan. For example, a $365 reservation purchase appears as $1.00 daily charges in amortized cost view.
39+
> The API supports both **ActualCost** and **AmortizedCost** metrics. ActualCost shows charges as they were billed, while AmortizedCost spreads reservation and savings plans purchases across their term and reallocates costs to the resources that used the reservation or savings plan. For example, a 1-year reservation costing $365 will appear in ActualCost as a single charge on the purchase date. In AmortizedCost, that same $365 is spread out as a daily $1.00 charge across the usage that benefits from the reservation.
3740
3841
## Step 1: Create a report
3942

@@ -74,8 +77,8 @@ The request body supports the following parameters:
7477

7578
- **metric** - The type of report requested. Can be either `ActualCost` or `AmortizedCost`. If not specified, defaults to `ActualCost`.
7679
- **timePeriod** - The requested date range for your data. Specify `start` and `end` dates in YYYY-MM-DD format. Can't be used alongside invoiceId or billingPeriod parameters.
77-
- **invoiceId** - The requested invoice for your data. This parameter is only used by Microsoft Customer Agreement customers and can only be used at the Billing Profile or Customer scope. Can't be used alongside billingPeriod or timePeriod parameters.
78-
- **billingPeriod** - The requested billing period for your data. This parameter is only used by Enterprise Agreement customers. Use the YearMonth format (for example, 202408). Can't be used alongside invoiceId or timePeriod parameters.
80+
- **invoiceId** - The requested invoice for your data. This parameter is supported for Microsoft Customer Agreement customers at the Billing Profile or Customer scope. Can't be used alongside billingPeriod or timePeriod parameters.
81+
- **billingPeriod** - The requested billing period for your data. This parameter is supported for Enterprise Agreement customers. Use the YearMonth format (for example, 202408). Can't be used alongside invoiceId or timePeriod parameters.
7982

8083
> [!NOTE]
8184
> If none of the timePeriod, invoiceId, or billingPeriod parameters are provided in the request body, the API returns the current month's cost.
@@ -142,10 +145,10 @@ When the report is complete, the polling endpoint returns status code 200 (OK) w
142145
|**dataFormat** | Format of the generated report (CSV) |
143146
|**blobCount** | Number of blob files in the report dataset |
144147
|**byteCount** | Total size of the report dataset in bytes |
145-
|**blobLink** | Download URL for the cost details CSV file |
148+
|**blobLink** | Download URL for the Cost Details CSV file |
146149
|**validTill** | Expiration date/time for the download URL |
147150

148-
## Cost details file fields
151+
## Cost Details file fields
149152

150153
The downloaded CSV file contains detailed cost and usage data with the following key fields:
151154

@@ -194,4 +197,4 @@ Other status codes indicate error conditions. The response object explains why t
194197
- [Get started with Azure REST API](/rest/api/azure/)
195198
- [Learn more about the Cost Details API](/rest/api/cost-management/generate-cost-details-report)
196199
- [Get small cost datasets on demand](../automate/get-small-usage-datasets-on-demand.md)
197-
- [Understand cost details fields](../automate/understand-usage-details-fields.md)
200+
- [Understand Cost Details fields](../automate/understand-usage-details-fields.md)

0 commit comments

Comments
 (0)