Skip to content

Commit 3cd812a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Clarify which usage API endpoints must be called using root org keys (#1601)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 9098832 commit 3cd812a

File tree

7 files changed

+54
-32
lines changed

7 files changed

+54
-32
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-04-19 13:48:46.873666",
8-
"spec_repo_commit": "d5fb4450"
7+
"regenerated": "2024-04-19 20:49:41.651088",
8+
"spec_repo_commit": "c3db9ec1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-04-19 13:48:46.892304",
13-
"spec_repo_commit": "d5fb4450"
12+
"regenerated": "2024-04-19 20:49:41.669675",
13+
"spec_repo_commit": "c3db9ec1"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30958,7 +30958,10 @@ paths:
3095830958
- Usage Metering
3095930959
/api/v1/usage/billable-summary:
3096030960
get:
30961-
description: Get billable usage across your account.
30961+
description: 'Get billable usage across your account.
30962+
30963+
30964+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
3096230965
operationId: GetUsageBillableSummary
3096330966
parameters:
3096430967
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
@@ -32489,7 +32492,10 @@ paths:
3248932492
- Usage Metering
3249032493
/api/v1/usage/summary:
3249132494
get:
32492-
description: Get all usage across your account.
32495+
description: 'Get all usage across your account.
32496+
32497+
32498+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
3249332499
operationId: GetUsageSummary
3249432500
parameters:
3249532501
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
@@ -33568,8 +33574,6 @@ tags:
3356833574

3356933575
This API is available to all Pro and Enterprise customers.
3357033576

33571-
Usage is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
33572-
3357333577

3357433578
**Note**: Usage data is delayed by up to 72 hours from when it was incurred.
3357533579

.generator/schemas/v2/openapi.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25314,7 +25314,8 @@ paths:
2531425314
end_month)\ncursor := response.metadata.pagination.next_record_id\nWHILE cursor
2531525315
!= null BEGIN\n sleep(5 seconds) # Avoid running into rate limit\n response
2531625316
:= GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor)\n
25317-
\ cursor := response.metadata.pagination.next_record_id\nEND\n```"
25317+
\ cursor := response.metadata.pagination.next_record_id\nEND\n```\n\nThis
25318+
endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/)."
2531825319
operationId: GetMonthlyCostAttribution
2531925320
parameters:
2532025321
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
@@ -35214,7 +35215,10 @@ paths:
3521435215

3521535216
[`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account)
3521635217

35217-
instead.'
35218+
instead.
35219+
35220+
35221+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
3521835222
operationId: GetCostByOrg
3521935223
parameters:
3522035224
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
@@ -35274,7 +35278,10 @@ paths:
3527435278

3527535279
and is delayed by up to 72 hours from when it was incurred.
3527635280

35277-
To access historical costs prior to this, use the `/historical_cost` endpoint.'
35281+
To access historical costs prior to this, use the `/historical_cost` endpoint.
35282+
35283+
35284+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
3527835285
operationId: GetEstimatedCostByOrg
3527935286
parameters:
3528035287
- description: String to specify whether cost is broken down at a parent-org
@@ -35359,7 +35366,10 @@ paths:
3535935366
description: 'Get historical cost across multi-org and single root-org accounts.
3536035367

3536135368
Cost data for a given month becomes available no later than the 16th of the
35362-
following month.'
35369+
following month.
35370+
35371+
35372+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
3536335373
operationId: GetHistoricalCostByOrg
3536435374
parameters:
3536535375
- description: String to specify whether cost is broken down at a parent-org
@@ -35671,7 +35681,8 @@ paths:
3567135681
Projected cost data is only available for the current month and becomes available
3567235682
around the 12th of the month.
3567335683

35674-
This endpoint requires the usage_read authorization scope.'
35684+
35685+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
3567535686
operationId: GetProjectedCost
3567635687
parameters:
3567735688
- description: String to specify whether cost is broken down at a parent-org
@@ -36502,8 +36513,6 @@ tags:
3650236513

3650336514
This API is available to all Pro and Enterprise customers.
3650436515

36505-
Usage is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
36506-
3650736516

3650836517
**Note**: Usage data is delayed by up to 72 hours from when it was incurred.
3650936518

features/v1/usage_metering.feature

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
Feature: Usage Metering
33
The usage metering API allows you to get hourly, daily, and monthly usage
44
across multiple facets of Datadog. This API is available to all Pro and
5-
Enterprise customers. Usage is only accessible for [parent-level organizat
6-
ions](https://docs.datadoghq.com/account_management/multi_organization/).
7-
**Note**: Usage data is delayed by up to 72 hours from when it was
8-
incurred. It is retained for 15 months. You can retrieve up to 24 hours
9-
of hourly usage data for multiple organizations, and up to two months of
10-
hourly usage data for a single organization in one request. Learn more on
11-
the [usage details documentation](https://docs.datadoghq.com/account_manag
12-
ement/billing/usage_details/).
5+
Enterprise customers. **Note**: Usage data is delayed by up to 72 hours
6+
from when it was incurred. It is retained for 15 months. You can retrieve
7+
up to 24 hours of hourly usage data for multiple organizations, and up to
8+
two months of hourly usage data for a single organization in one request.
9+
Learn more on the [usage details documentation](https://docs.datadoghq.com
10+
/account_management/billing/usage_details/).
1311

1412
Background:
1513
Given a valid "apiKeyAuth" key in the system

features/v2/usage_metering.feature

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
Feature: Usage Metering
33
The usage metering API allows you to get hourly, daily, and monthly usage
44
across multiple facets of Datadog. This API is available to all Pro and
5-
Enterprise customers. Usage is only accessible for [parent-level organizat
6-
ions](https://docs.datadoghq.com/account_management/multi_organization/).
7-
**Note**: Usage data is delayed by up to 72 hours from when it was
8-
incurred. It is retained for 15 months. You can retrieve up to 24 hours
9-
of hourly usage data for multiple organizations, and up to two months of
10-
hourly usage data for a single organization in one request. Learn more on
11-
the [usage details documentation](https://docs.datadoghq.com/account_manag
12-
ement/billing/usage_details/).
5+
Enterprise customers. **Note**: Usage data is delayed by up to 72 hours
6+
from when it was incurred. It is retained for 15 months. You can retrieve
7+
up to 24 hours of hourly usage data for multiple organizations, and up to
8+
two months of hourly usage data for a single organization in one request.
9+
Learn more on the [usage details documentation](https://docs.datadoghq.com
10+
/account_management/billing/usage_details/).
1311

1412
Background:
1513
Given a valid "apiKeyAuth" key in the system

packages/datadog-api-client-v1/apis/UsageMeteringApi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5169,6 +5169,8 @@ export class UsageMeteringApi {
51695169

51705170
/**
51715171
* Get billable usage across your account.
5172+
*
5173+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
51725174
* @param param The request object
51735175
*/
51745176
public getUsageBillableSummary(
@@ -5660,6 +5662,8 @@ export class UsageMeteringApi {
56605662

56615663
/**
56625664
* Get all usage across your account.
5665+
*
5666+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
56635667
* @param param The request object
56645668
*/
56655669
public getUsageSummary(

packages/datadog-api-client-v2/apis/UsageMeteringApi.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,6 +1507,8 @@ export class UsageMeteringApi {
15071507
* **Note:** This endpoint has been deprecated. Please use the new endpoint
15081508
* [`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account)
15091509
* instead.
1510+
*
1511+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
15101512
* @param param The request object
15111513
*/
15121514
public getCostByOrg(
@@ -1532,6 +1534,8 @@ export class UsageMeteringApi {
15321534
* Estimated cost data is only available for the current month and previous month
15331535
* and is delayed by up to 72 hours from when it was incurred.
15341536
* To access historical costs prior to this, use the `/historical_cost` endpoint.
1537+
*
1538+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
15351539
* @param param The request object
15361540
*/
15371541
public getEstimatedCostByOrg(
@@ -1558,6 +1562,8 @@ export class UsageMeteringApi {
15581562
/**
15591563
* Get historical cost across multi-org and single root-org accounts.
15601564
* Cost data for a given month becomes available no later than the 16th of the following month.
1565+
*
1566+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
15611567
* @param param The request object
15621568
*/
15631569
public getHistoricalCostByOrg(
@@ -1622,6 +1628,8 @@ export class UsageMeteringApi {
16221628
* cursor := response.metadata.pagination.next_record_id
16231629
* END
16241630
* ```
1631+
*
1632+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
16251633
* @param param The request object
16261634
*/
16271635
public getMonthlyCostAttribution(
@@ -1653,7 +1661,8 @@ export class UsageMeteringApi {
16531661
/**
16541662
* Get projected cost across multi-org and single root-org accounts.
16551663
* Projected cost data is only available for the current month and becomes available around the 12th of the month.
1656-
* This endpoint requires the usage_read authorization scope.
1664+
*
1665+
* This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
16571666
* @param param The request object
16581667
*/
16591668
public getProjectedCost(

0 commit comments

Comments
 (0)