@@ -4123,6 +4123,63 @@ components:
4123
4123
- IDENTITY
4124
4124
- GZIP
4125
4125
- 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
4126
4183
CostByOrg:
4127
4184
description: Cost data.
4128
4185
properties:
@@ -10921,6 +10978,75 @@ components:
10921
10978
description: The monitor type.
10922
10979
type: string
10923
10980
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
10924
11050
NullableRelationshipToUser:
10925
11051
description: Relationship to user.
10926
11052
nullable: true
@@ -17085,6 +17211,16 @@ components:
17085
17211
- channel_name
17086
17212
- redirect_url
17087
17213
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
17088
17224
Span:
17089
17225
description: Object description of a spans after being processed and stored
17090
17226
by Datadog.
@@ -20906,6 +21042,128 @@ paths:
20906
21042
x-unstable: '**Note**: This endpoint is in public beta.
20907
21043
20908
21044
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/).'
20909
21167
/api/v2/current_user/application_keys:
20910
21168
get:
20911
21169
description: List all application keys available for current user
0 commit comments