Skip to content

Commit fdb24f9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 98884042 of spec repo
1 parent c25c467 commit fdb24f9

File tree

22 files changed

+1158
-4
lines changed

22 files changed

+1158
-4
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": "2023-11-16 18:34:27.532496",
8-
"spec_repo_commit": "973bd612"
7+
"regenerated": "2023-11-16 19:38:34.020238",
8+
"spec_repo_commit": "98884042"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-16 18:34:27.550231",
13-
"spec_repo_commit": "973bd612"
12+
"regenerated": "2023-11-16 19:38:34.039208",
13+
"spec_repo_commit": "98884042"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4123,6 +4123,63 @@ components:
41234123
- IDENTITY
41244124
- GZIP
41254125
- DEFLATE
4126+
CostAttributionAggregates:
4127+
description: An array of available aggregates.
4128+
items:
4129+
$ref: '#/components/schemas/CostAttributionAggregatesBody'
4130+
type: array
4131+
CostAttributionAggregatesBody:
4132+
description: The object containing the aggregates.
4133+
properties:
4134+
agg_type:
4135+
description: The aggregate type.
4136+
example: sum
4137+
type: string
4138+
field:
4139+
description: The field.
4140+
example: infra_host_committed_cost
4141+
type: string
4142+
value:
4143+
description: The value for a given field.
4144+
format: double
4145+
type: number
4146+
type: object
4147+
CostAttributionTagNames:
4148+
additionalProperties:
4149+
description: 'A list of values that are associated with each tag key.
4150+
4151+
- An empty list means the resource use wasn''t tagged with the respective
4152+
tag.
4153+
4154+
- Multiple values means the respective tag was applied multiple times on
4155+
the resource.
4156+
4157+
- An `<empty>` value means the resource was tagged with the respective tag
4158+
but did not have a value.'
4159+
items:
4160+
description: A given tag in a list.
4161+
example: datadog-integrations-lab
4162+
type: string
4163+
type: array
4164+
description: 'Tag keys and values.
4165+
4166+
A `null` value here means that the requested tag breakdown cannot be applied
4167+
because it does not match the [tags
4168+
4169+
configured for usage attribution](https://docs.datadoghq.com/account_management/billing/usage_attribution/#getting-started).
4170+
4171+
In this scenario the API returns the total cost, not broken down by tags.'
4172+
nullable: true
4173+
type: object
4174+
CostAttributionType:
4175+
default: cost_by_tag
4176+
description: Type of cost attribution data.
4177+
enum:
4178+
- cost_by_tag
4179+
example: cost_by_tag
4180+
type: string
4181+
x-enum-varnames:
4182+
- COST_BY_TAG
41264183
CostByOrg:
41274184
description: Cost data.
41284185
properties:
@@ -10921,6 +10978,75 @@ components:
1092110978
description: The monitor type.
1092210979
type: string
1092310980
type: object
10981+
MonthlyCostAttributionAttributes:
10982+
description: Cost Attribution by Tag for a given organization.
10983+
properties:
10984+
month:
10985+
description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`.'
10986+
format: date-time
10987+
type: string
10988+
org_name:
10989+
description: The name of the organization.
10990+
type: string
10991+
public_id:
10992+
description: The organization public ID.
10993+
type: string
10994+
tag_config_source:
10995+
description: The source of the cost attribution tag configuration and the
10996+
selected tags in the format `<source_org_name>:::<selected tag 1>///<selected
10997+
tag 2>///<selected tag 3>`.
10998+
type: string
10999+
tags:
11000+
$ref: '#/components/schemas/CostAttributionTagNames'
11001+
updated_at:
11002+
description: Shows the most recent hour in the current months for all organizations
11003+
for which all costs were calculated.
11004+
type: string
11005+
values:
11006+
description: 'Fields in Cost Attribution by tag(s). Example: `infra_host_on_demand_cost`,
11007+
`infra_host_committed_cost`, `infra_host_total_cost`, `infra_host_percentage_in_org`,
11008+
`infra_host_percentage_in_account`.'
11009+
type: object
11010+
type: object
11011+
MonthlyCostAttributionBody:
11012+
description: Cost data.
11013+
properties:
11014+
attributes:
11015+
$ref: '#/components/schemas/MonthlyCostAttributionAttributes'
11016+
id:
11017+
description: Unique ID of the response.
11018+
type: string
11019+
type:
11020+
$ref: '#/components/schemas/CostAttributionType'
11021+
type: object
11022+
MonthlyCostAttributionMeta:
11023+
description: The object containing document metadata.
11024+
properties:
11025+
aggregates:
11026+
$ref: '#/components/schemas/CostAttributionAggregates'
11027+
pagination:
11028+
$ref: '#/components/schemas/MonthlyCostAttributionPagination'
11029+
type: object
11030+
MonthlyCostAttributionPagination:
11031+
description: The metadata for the current pagination.
11032+
properties:
11033+
next_record_id:
11034+
description: The cursor to use to get the next results, if any. To make
11035+
the next request, use the same parameters with the addition of the `next_record_id`.
11036+
nullable: true
11037+
type: string
11038+
type: object
11039+
MonthlyCostAttributionResponse:
11040+
description: Response containing the monthly cost attribution by tag(s).
11041+
properties:
11042+
data:
11043+
description: Response containing cost attribution.
11044+
items:
11045+
$ref: '#/components/schemas/MonthlyCostAttributionBody'
11046+
type: array
11047+
meta:
11048+
$ref: '#/components/schemas/MonthlyCostAttributionMeta'
11049+
type: object
1092411050
NullableRelationshipToUser:
1092511051
description: Relationship to user.
1092611052
nullable: true
@@ -17085,6 +17211,16 @@ components:
1708517211
- channel_name
1708617212
- redirect_url
1708717213
type: object
17214+
SortDirection:
17215+
default: desc
17216+
description: The direction to sort by.
17217+
enum:
17218+
- desc
17219+
- asc
17220+
type: string
17221+
x-enum-varnames:
17222+
- DESC
17223+
- ASC
1708817224
Span:
1708917225
description: Object description of a spans after being processed and stored
1709017226
by Datadog.
@@ -20906,6 +21042,128 @@ paths:
2090621042
x-unstable: '**Note**: This endpoint is in public beta.
2090721043

2090821044
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
21045+
/api/v2/cost_by_tag/monthly_cost_attribution:
21046+
get:
21047+
description: "Get monthly cost attribution by tag across multi-org and single
21048+
root-org accounts.\nCost Attribution data for a given month becomes available
21049+
no later than the 17th of the following month.\nThis API endpoint is paginated.
21050+
To make sure you receive all records, check if the value of `next_record_id`
21051+
is\nset in the response. If it is, make another request and pass `next_record_id`
21052+
as a parameter.\nPseudo code example:\n```\nresponse := GetMonthlyCostAttribution(start_month,
21053+
end_month)\ncursor := response.metadata.pagination.next_record_id\nWHILE cursor
21054+
!= null BEGIN\n sleep(5 seconds) # Avoid running into rate limit\n response
21055+
:= GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor)\n
21056+
\ cursor := response.metadata.pagination.next_record_id\nEND\n```"
21057+
operationId: GetMonthlyCostAttribution
21058+
parameters:
21059+
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
21060+
for cost beginning in this month.'
21061+
in: query
21062+
name: start_month
21063+
required: true
21064+
schema:
21065+
format: date-time
21066+
type: string
21067+
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
21068+
for cost ending this month.'
21069+
in: query
21070+
name: end_month
21071+
required: true
21072+
schema:
21073+
format: date-time
21074+
type: string
21075+
- description: 'Comma-separated list specifying cost types (e.g., `<billing_dimension>_on_demand_cost`,
21076+
`<billing_dimension>_committed_cost`, `<billing_dimension>_total_cost`)
21077+
and the
21078+
21079+
proportions (`<billing_dimension>_percentage_in_org`, `<billing_dimension>_percentage_in_account`).
21080+
Use `*` to retrieve all fields.
21081+
21082+
Example: `infra_host_on_demand_cost,infra_host_percentage_in_account`
21083+
21084+
To obtain the complete list of active billing dimensions that can be used
21085+
to replace
21086+
21087+
`<billing_dimension>` in the field names, make a request to the [Get active
21088+
billing dimensions API](https://docs.datadoghq.com/api/latest/usage-metering/#get-active-billing-dimensions-for-cost-attribution).'
21089+
in: query
21090+
name: fields
21091+
required: true
21092+
schema:
21093+
type: string
21094+
- description: 'The direction to sort by: `[desc, asc]`.'
21095+
in: query
21096+
name: sort_direction
21097+
required: false
21098+
schema:
21099+
$ref: '#/components/schemas/SortDirection'
21100+
- description: 'The billing dimension to sort by. Always sorted by total cost.
21101+
Example: `infra_host`.'
21102+
in: query
21103+
name: sort_name
21104+
required: false
21105+
schema:
21106+
type: string
21107+
- description: 'Comma separated list of tag keys used to group cost. If no value
21108+
is provided the cost will not be broken down by tags.
21109+
21110+
To see which tags are available, look for the value of `tag_config_source`
21111+
in the API response.'
21112+
in: query
21113+
name: tag_breakdown_keys
21114+
required: false
21115+
schema:
21116+
type: string
21117+
- description: List following results with a next_record_id provided in the
21118+
previous query.
21119+
in: query
21120+
name: next_record_id
21121+
required: false
21122+
schema:
21123+
type: string
21124+
- description: Include child org cost in the response. Defaults to `true`.
21125+
in: query
21126+
name: include_descendants
21127+
required: false
21128+
schema:
21129+
default: true
21130+
type: boolean
21131+
responses:
21132+
'200':
21133+
content:
21134+
application/json;datetime-format=rfc3339:
21135+
schema:
21136+
$ref: '#/components/schemas/MonthlyCostAttributionResponse'
21137+
description: OK
21138+
'400':
21139+
content:
21140+
application/json;datetime-format=rfc3339:
21141+
schema:
21142+
$ref: '#/components/schemas/APIErrorResponse'
21143+
description: Bad Request
21144+
'403':
21145+
content:
21146+
application/json;datetime-format=rfc3339:
21147+
schema:
21148+
$ref: '#/components/schemas/APIErrorResponse'
21149+
description: Forbidden - User is not authorized
21150+
'429':
21151+
content:
21152+
application/json;datetime-format=rfc3339:
21153+
schema:
21154+
$ref: '#/components/schemas/APIErrorResponse'
21155+
description: Too many requests
21156+
security:
21157+
- apiKeyAuth: []
21158+
appKeyAuth: []
21159+
- AuthZ:
21160+
- usage_read
21161+
summary: Get Monthly Cost Attribution
21162+
tags:
21163+
- Usage Metering
21164+
x-unstable: '**Note**: This endpoint is in public beta.
21165+
21166+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
2090921167
/api/v2/current_user/application_keys:
2091021168
get:
2091121169
description: List all application keys available for current user
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-11-09T21:04:11.196Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"log": {
3+
"_recordingName": "Usage Metering/Get Monthly Cost Attribution returns \"Bad Request\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "18ee4756df00da9bd5f76c9eb18f2a57",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json;datetime-format=rfc3339"
22+
}
23+
],
24+
"headersSize": 666,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "start_month",
30+
"value": "2023-11-04T21:04:11.196Z"
31+
},
32+
{
33+
"name": "end_month",
34+
"value": "2023-11-06T21:04:11.196Z"
35+
},
36+
{
37+
"name": "fields",
38+
"value": "not_a_product"
39+
}
40+
],
41+
"url": "https://api.datadoghq.com/api/v2/cost_by_tag/monthly_cost_attribution?start_month=2023-11-04T21%3A04%3A11.196Z&end_month=2023-11-06T21%3A04%3A11.196Z&fields=not_a_product"
42+
},
43+
"response": {
44+
"bodySize": 96,
45+
"content": {
46+
"mimeType": "application/json",
47+
"size": 96,
48+
"text": "{\"errors\":[\"API called with non-parent org keys. Data is only available at the root level org\"]}"
49+
},
50+
"cookies": [],
51+
"headers": [
52+
{
53+
"name": "content-type",
54+
"value": "application/json"
55+
}
56+
],
57+
"headersSize": 649,
58+
"httpVersion": "HTTP/1.1",
59+
"redirectURL": "",
60+
"status": 400,
61+
"statusText": "Bad Request"
62+
},
63+
"startedDateTime": "2023-11-09T21:04:11.207Z",
64+
"time": 215
65+
}
66+
],
67+
"pages": [],
68+
"version": "1.2"
69+
}
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-11-09T21:14:30.498Z"

0 commit comments

Comments
 (0)