Skip to content

Commit 334a603

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit bcc45c0f of spec repo
1 parent 7a42db5 commit 334a603

22 files changed

+518
-25
lines changed

.apigentools-info

+4-4
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": "2025-05-02 04:31:15.271278",
8-
"spec_repo_commit": "272cce39"
7+
"regenerated": "2025-05-03 11:58:54.617082",
8+
"spec_repo_commit": "bcc45c0f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-02 04:31:15.291066",
13-
"spec_repo_commit": "272cce39"
12+
"regenerated": "2025-05-03 11:58:54.633182",
13+
"spec_repo_commit": "bcc45c0f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+154-6
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,87 @@ components:
21382138
- id
21392139
- base_severity
21402140
type: object
2141+
AlertEventCustomAttributes:
2142+
description: Object representing custom alert event attributes.
2143+
properties:
2144+
custom:
2145+
$ref: '#/components/schemas/AlertEventCustomAttributesCustom'
2146+
links:
2147+
$ref: '#/components/schemas/AlertEventCustomAttributesLinks'
2148+
priority:
2149+
$ref: '#/components/schemas/AlertEventCustomAttributesPriority'
2150+
status:
2151+
$ref: '#/components/schemas/AlertEventCustomAttributesStatus'
2152+
type: object
2153+
AlertEventCustomAttributesCustom:
2154+
description: Custom attributes support up to 100 properties and a maximum nesting
2155+
depth of 10 levels.
2156+
example: {}
2157+
type: object
2158+
AlertEventCustomAttributesLinks:
2159+
description: The links related to the event.
2160+
items:
2161+
$ref: '#/components/schemas/AlertEventCustomAttributesLinksItems'
2162+
maxItems: 20
2163+
minItems: 1
2164+
type: array
2165+
AlertEventCustomAttributesLinksItems:
2166+
description: A link.
2167+
properties:
2168+
category:
2169+
$ref: '#/components/schemas/AlertEventCustomAttributesLinksItemsCategory'
2170+
title:
2171+
description: The title of the link.
2172+
example: Runbook Link
2173+
maxLength: 300
2174+
type: string
2175+
url:
2176+
description: The URL of the link.
2177+
example: https://app.datadoghq.com/runbook
2178+
maxLength: 2048
2179+
type: string
2180+
required:
2181+
- url
2182+
- category
2183+
type: object
2184+
AlertEventCustomAttributesLinksItemsCategory:
2185+
description: The category of the link.
2186+
enum:
2187+
- runbook
2188+
example: runbook
2189+
type: string
2190+
x-enum-varnames:
2191+
- RUNBOOK
2192+
AlertEventCustomAttributesPriority:
2193+
description: The priority of the alert.
2194+
enum:
2195+
- '1'
2196+
- '2'
2197+
- '3'
2198+
- '4'
2199+
- '5'
2200+
example: '1'
2201+
type: string
2202+
x-enum-varnames:
2203+
- PRIORITY_ONE
2204+
- PRIORITY_TWO
2205+
- PRIORITY_THREE
2206+
- PRIORITY_FOUR
2207+
- PRIORITY_FIVE
2208+
AlertEventCustomAttributesStatus:
2209+
description: The status of the alert.
2210+
enum:
2211+
- info
2212+
- warn
2213+
- error
2214+
- ok
2215+
example: warn
2216+
type: string
2217+
x-enum-varnames:
2218+
- INFO
2219+
- WARN
2220+
- ERROR
2221+
- OK
21412222
Annotation:
21422223
description: A list of annotations used in the workflow. These are like sticky
21432224
notes for your workflow!
@@ -13949,28 +14030,34 @@ components:
1394914030
type: string
1395014031
type: object
1395114032
EventCategory:
13952-
description: Event category to identify the type of event. Only the value `change`
13953-
is supported. Support for other categories are coming. please reach out to
13954-
datadog support if you're interested.
14033+
description: Event category to identify the type of event. For example, `change`
14034+
or `alert`.
1395514035
enum:
1395614036
- change
14037+
- alert
1395714038
example: change
1395814039
type: string
1395914040
x-enum-varnames:
1396014041
- CHANGE
14042+
- ALERT
1396114043
EventCreateRequest:
1396214044
description: Object representing an event creation request.
1396314045
properties:
1396414046
attributes:
1396514047
$ref: '#/components/schemas/EventPayload'
1396614048
type:
1396714049
$ref: '#/components/schemas/EventCreateRequestType'
14050+
required:
14051+
- type
14052+
- attributes
1396814053
type: object
1396914054
EventCreateRequestPayload:
1397014055
description: Payload for creating an event.
1397114056
properties:
1397214057
data:
1397314058
$ref: '#/components/schemas/EventCreateRequest'
14059+
required:
14060+
- data
1397414061
type: object
1397514062
EventCreateRequestType:
1397614063
description: Entity type.
@@ -13985,6 +14072,10 @@ components:
1398514072
properties:
1398614073
attributes:
1398714074
$ref: '#/components/schemas/EventCreateResponseAttributes'
14075+
id:
14076+
description: Event ID
14077+
example: _
14078+
type: string
1398814079
type:
1398914080
description: Event type
1399014081
example: event
@@ -14006,28 +14097,46 @@ components:
1400614097
EventCreateResponseAttributesAttributesEvt:
1400714098
description: JSON object of event system attributes.
1400814099
properties:
14009-
id:
14010-
description: Event id
14100+
uid:
14101+
description: Event UID
14102+
example: ABCDEFGHIJKLMNOPQRSTUVWX
1401114103
type: string
1401214104
type: object
1401314105
EventCreateResponsePayload:
1401414106
description: Response containing information about created event.
1401514107
properties:
1401614108
data:
1401714109
$ref: '#/components/schemas/EventCreateResponse'
14110+
links:
14111+
$ref: '#/components/schemas/EventCreateResponsePayloadLinks'
14112+
type: object
14113+
EventCreateResponsePayloadLinks:
14114+
description: Links attributes.
14115+
properties:
14116+
self:
14117+
description: The URL of the event.
14118+
example: https://app.datadoghq.com/event/event?id=123
14119+
type: string
1401814120
type: object
1401914121
EventPayload:
1402014122
description: Event attributes.
1402114123
properties:
1402214124
aggregation_key:
1402314125
description: An arbitrary string to use for aggregation when correlating
1402414126
events. Limited to 100 characters.
14127+
example: aggregation_key_123
1402514128
maxLength: 100
1402614129
type: string
1402714130
attributes:
1402814131
$ref: '#/components/schemas/EventPayloadAttributes'
1402914132
category:
1403014133
$ref: '#/components/schemas/EventCategory'
14134+
integration_id:
14135+
description: Integration IDs sourced from manifests. Examples include custom-events,
14136+
containerd, docker, elasticsearch, helm, mongodb, mysql, and nagios. See
14137+
the full list of available IDs [here](https://docs.datadoghq.com/getting_started/integrations/).
14138+
example: custom-events
14139+
type: string
1403114140
message:
1403214141
description: The body of the event. Limited to 4000 characters.
1403314142
example: payment_processed feature flag has been enabled
@@ -14041,7 +14150,10 @@ components:
1404114150
- env:test
1404214151
items:
1404314152
description: A tag.
14153+
maxLength: 200
1404414154
type: string
14155+
maxItems: 100
14156+
minItems: 1
1404514157
type: array
1404614158
timestamp:
1404714159
description: 'Timestamp when the event occurred. Must follow [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
@@ -14067,6 +14179,7 @@ components:
1406714179
event category.
1406814180
oneOf:
1406914181
- $ref: '#/components/schemas/ChangeEventCustomAttributes'
14182+
- $ref: '#/components/schemas/AlertEventCustomAttributes'
1407014183
EventPriority:
1407114184
description: The priority of the event's monitor. For example, `normal` or `low`.
1407214185
enum:
@@ -45283,7 +45396,8 @@ paths:
4528345396
- events_read
4528445397
post:
4528545398
description: "This endpoint allows you to post events.\n\n\u2705 **Only events
45286-
with the `change` category** are in General Availability. See [Change Tracking](https://docs.datadoghq.com/change_tracking)
45399+
with the `change` or `alert` category** are in General Availability. For change
45400+
events, see [Change Tracking](https://docs.datadoghq.com/change_tracking)
4528745401
for more details.\n\n\u274C For use cases involving other event categories,
4528845402
please use the V1 endpoint."
4528945403
operationId: CreateEvent
@@ -45295,6 +45409,7 @@ paths:
4529545409
value:
4529645410
data:
4529745411
attributes:
45412+
aggregation_key: aggregation_key_123
4529845413
attributes:
4529945414
author:
4530045415
@@ -45323,6 +45438,7 @@ paths:
4532345438
rule:
4532445439
datacenter: devcycle.us1.prod
4532545440
category: change
45441+
integration_id: custom-events
4532645442
message: payment_processed feature flag has been enabled
4532745443
tags:
4532845444
- env:test
@@ -45356,6 +45472,38 @@ paths:
4535645472
security:
4535745473
- apiKeyAuth: []
4535845474
appKeyAuth: []
45475+
servers:
45476+
- url: https://{subdomain}.{site}
45477+
variables:
45478+
site:
45479+
default: datadoghq.com
45480+
description: The regional site for customers.
45481+
enum:
45482+
- datadoghq.com
45483+
- us3.datadoghq.com
45484+
- us5.datadoghq.com
45485+
- ap1.datadoghq.com
45486+
- datadoghq.eu
45487+
- ddog-gov.com
45488+
subdomain:
45489+
default: event-management-intake
45490+
description: The subdomain where the API is deployed.
45491+
- url: '{protocol}://{name}'
45492+
variables:
45493+
name:
45494+
default: event-management-intake.datadoghq.com
45495+
description: Full site DNS name.
45496+
protocol:
45497+
default: https
45498+
description: The protocol for accessing the API.
45499+
- url: https://{subdomain}.{site}
45500+
variables:
45501+
site:
45502+
default: datadoghq.com
45503+
description: Any Datadog deployment.
45504+
subdomain:
45505+
default: event-management-intake
45506+
description: The subdomain where the API is deployed.
4535945507
summary: Post an event
4536045508
tags:
4536145509
- Events

examples/v2/events/CreateEvent.ts

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const params: v2.EventsApiCreateEventRequest = {
1111
body: {
1212
data: {
1313
attributes: {
14+
aggregationKey: "aggregation_key_123",
1415
attributes: {
1516
author: {
1617
@@ -42,6 +43,7 @@ const params: v2.EventsApiCreateEventRequest = {
4243
},
4344
},
4445
category: "change",
46+
integrationId: "custom-events",
4547
message: "payment_processed feature flag has been enabled",
4648
tags: ["env:test"],
4749
title: "payment_processed feature flag updated",

features/v2/events.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ Feature: Events
5353
@generated @skip @team:DataDog/event-management
5454
Scenario: Post an event returns "Bad request" response
5555
Given new "CreateEvent" request
56-
And body with value {"data": {"attributes": {"attributes": {"author": {"name": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "message": "payment_processed feature flag has been enabled", "tags": ["env:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
56+
And body with value {"data": {"attributes": {"aggregation_key": "aggregation_key_123", "attributes": {"author": {"name": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "integration_id": "custom-events", "message": "payment_processed feature flag has been enabled", "tags": ["env:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
5757
When the request is sent
5858
Then the response status is 400 Bad request
5959

6060
@generated @skip @team:DataDog/event-management
6161
Scenario: Post an event returns "OK" response
6262
Given new "CreateEvent" request
63-
And body with value {"data": {"attributes": {"attributes": {"author": {"name": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "message": "payment_processed feature flag has been enabled", "tags": ["env:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
63+
And body with value {"data": {"attributes": {"aggregation_key": "aggregation_key_123", "attributes": {"author": {"name": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "integration_id": "custom-events", "message": "payment_processed feature flag has been enabled", "tags": ["env:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
6464
When the request is sent
6565
Then the response status is 200 OK
6666

packages/datadog-api-client-common/servers.ts

+29
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,35 @@ export const operationServers: {
153153
subdomain: "http-intake.logs",
154154
}),
155155
],
156+
"v2.EventsApi.createEvent": [
157+
new ServerConfiguration<{
158+
site:
159+
| "datadoghq.com"
160+
| "us3.datadoghq.com"
161+
| "us5.datadoghq.com"
162+
| "ap1.datadoghq.com"
163+
| "datadoghq.eu"
164+
| "ddog-gov.com";
165+
subdomain: string;
166+
}>("https://{subdomain}.{site}", {
167+
site: "datadoghq.com",
168+
subdomain: "event-management-intake",
169+
}),
170+
new ServerConfiguration<{
171+
name: string;
172+
protocol: string;
173+
}>("{protocol}://{name}", {
174+
name: "event-management-intake.datadoghq.com",
175+
protocol: "https",
176+
}),
177+
new ServerConfiguration<{
178+
site: string;
179+
subdomain: string;
180+
}>("https://{subdomain}.{site}", {
181+
site: "datadoghq.com",
182+
subdomain: "event-management-intake",
183+
}),
184+
],
156185
"v2.LogsApi.submitLog": [
157186
new ServerConfiguration<{
158187
site:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export class EventsApi {
455455
/**
456456
* This endpoint allows you to post events.
457457
*
458-
* ✅ **Only events with the `change` category** are in General Availability. See [Change Tracking](https://docs.datadoghq.com/change_tracking) for more details.
458+
* ✅ **Only events with the `change` or `alert` category** are in General Availability. For change events, see [Change Tracking](https://docs.datadoghq.com/change_tracking) for more details.
459459
*
460460
* ❌ For use cases involving other event categories, please use the V1 endpoint.
461461
* @param param The request object

packages/datadog-api-client-v2/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,11 @@ export { ActiveBillingDimensionsBody } from "./models/ActiveBillingDimensionsBod
736736
export { ActiveBillingDimensionsResponse } from "./models/ActiveBillingDimensionsResponse";
737737
export { ActiveBillingDimensionsType } from "./models/ActiveBillingDimensionsType";
738738
export { Advisory } from "./models/Advisory";
739+
export { AlertEventCustomAttributes } from "./models/AlertEventCustomAttributes";
740+
export { AlertEventCustomAttributesLinksItems } from "./models/AlertEventCustomAttributesLinksItems";
741+
export { AlertEventCustomAttributesLinksItemsCategory } from "./models/AlertEventCustomAttributesLinksItemsCategory";
742+
export { AlertEventCustomAttributesPriority } from "./models/AlertEventCustomAttributesPriority";
743+
export { AlertEventCustomAttributesStatus } from "./models/AlertEventCustomAttributesStatus";
739744
export { Annotation } from "./models/Annotation";
740745
export { AnnotationDisplay } from "./models/AnnotationDisplay";
741746
export { AnnotationDisplayBounds } from "./models/AnnotationDisplayBounds";
@@ -1525,6 +1530,7 @@ export { EventCreateResponseAttributes } from "./models/EventCreateResponseAttri
15251530
export { EventCreateResponseAttributesAttributes } from "./models/EventCreateResponseAttributesAttributes";
15261531
export { EventCreateResponseAttributesAttributesEvt } from "./models/EventCreateResponseAttributesAttributesEvt";
15271532
export { EventCreateResponsePayload } from "./models/EventCreateResponsePayload";
1533+
export { EventCreateResponsePayloadLinks } from "./models/EventCreateResponsePayloadLinks";
15281534
export { EventPayload } from "./models/EventPayload";
15291535
export { EventPayloadAttributes } from "./models/EventPayloadAttributes";
15301536
export { EventPriority } from "./models/EventPriority";

0 commit comments

Comments
 (0)