Skip to content

Commit 5c5849e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 86eb3cb3 of spec repo
1 parent 7a42db5 commit 5c5849e

22 files changed

+521
-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-02 14:27:10.584347",
8+
"spec_repo_commit": "86eb3cb3"
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-02 14:27:10.600148",
13+
"spec_repo_commit": "86eb3cb3"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+156-6
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,86 @@ 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. Maximum 100 properties. Maximum 10 nested levels.
2155+
example: {}
2156+
type: object
2157+
AlertEventCustomAttributesLinks:
2158+
description: The links related to the event.
2159+
items:
2160+
$ref: '#/components/schemas/AlertEventCustomAttributesLinksItems'
2161+
maxItems: 20
2162+
minItems: 1
2163+
type: array
2164+
AlertEventCustomAttributesLinksItems:
2165+
description: A link.
2166+
properties:
2167+
category:
2168+
$ref: '#/components/schemas/AlertEventCustomAttributesLinksItemsCategory'
2169+
title:
2170+
description: The title of the link.
2171+
example: Runbook Link
2172+
maxLength: 300
2173+
type: string
2174+
url:
2175+
description: The URL of the link.
2176+
example: https://app.datadoghq.com/runbook
2177+
maxLength: 2048
2178+
type: string
2179+
required:
2180+
- url
2181+
- category
2182+
type: object
2183+
AlertEventCustomAttributesLinksItemsCategory:
2184+
description: The category of the link.
2185+
enum:
2186+
- runbook
2187+
example: runbook
2188+
type: string
2189+
x-enum-varnames:
2190+
- RUNBOOK
2191+
AlertEventCustomAttributesPriority:
2192+
description: The priority of the alert.
2193+
enum:
2194+
- '1'
2195+
- '2'
2196+
- '3'
2197+
- '4'
2198+
- '5'
2199+
example: '1'
2200+
type: string
2201+
x-enum-varnames:
2202+
- PRIORITY_ONE
2203+
- PRIORITY_TWO
2204+
- PRIORITY_THREE
2205+
- PRIORITY_FOUR
2206+
- PRIORITY_FIVE
2207+
AlertEventCustomAttributesStatus:
2208+
description: The status of the alert.
2209+
enum:
2210+
- info
2211+
- warn
2212+
- error
2213+
- ok
2214+
example: warn
2215+
type: string
2216+
x-enum-varnames:
2217+
- INFO
2218+
- WARN
2219+
- ERROR
2220+
- OK
21412221
Annotation:
21422222
description: A list of annotations used in the workflow. These are like sticky
21432223
notes for your workflow!
@@ -13949,28 +14029,35 @@ components:
1394914029
type: string
1395014030
type: object
1395114031
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.
14032+
description: Event category to identify the type of event. For example, `change`
14033+
or `alert`. Support for other categories are coming. please reach out to datadog
14034+
support if you're interested.
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 fetched from manifests. Option examples include
14136+
custom-events, containerd, docker, elasticsearch, helm, mongodb, mysql,
14137+
nagios etc. A complete list of integration ID values available here.
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)
@@ -14051,6 +14163,7 @@ components:
1405114163

1405214164
Defaults to the timestamp of receipt. Limited to values no older than
1405314165
18 hours.'
14166+
example: '2025-01-15T01:30:15.010000Z'
1405414167
type: string
1405514168
title:
1405614169
description: The event title. Limited to 500 characters.
@@ -14067,6 +14180,7 @@ components:
1406714180
event category.
1406814181
oneOf:
1406914182
- $ref: '#/components/schemas/ChangeEventCustomAttributes'
14183+
- $ref: '#/components/schemas/AlertEventCustomAttributes'
1407014184
EventPriority:
1407114185
description: The priority of the event's monitor. For example, `normal` or `low`.
1407214186
enum:
@@ -45283,7 +45397,8 @@ paths:
4528345397
- events_read
4528445398
post:
4528545399
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)
45400+
with the `change` or `alert` category** are in General Availability. For change
45401+
events, see [Change Tracking](https://docs.datadoghq.com/change_tracking)
4528745402
for more details.\n\n\u274C For use cases involving other event categories,
4528845403
please use the V1 endpoint."
4528945404
operationId: CreateEvent
@@ -45295,6 +45410,7 @@ paths:
4529545410
value:
4529645411
data:
4529745412
attributes:
45413+
aggregation_key: aggregation_key_123
4529845414
attributes:
4529945415
author:
4530045416
@@ -45323,9 +45439,11 @@ paths:
4532345439
rule:
4532445440
datacenter: devcycle.us1.prod
4532545441
category: change
45442+
integration_id: custom-events
4532645443
message: payment_processed feature flag has been enabled
4532745444
tags:
4532845445
- env:test
45446+
timestamp: '2025-01-15T01:30:15.010000Z'
4532945447
title: payment_processed feature flag updated
4533045448
type: event
4533145449
schema:
@@ -45356,6 +45474,38 @@ paths:
4535645474
security:
4535745475
- apiKeyAuth: []
4535845476
appKeyAuth: []
45477+
servers:
45478+
- url: https://{subdomain}.{site}
45479+
variables:
45480+
site:
45481+
default: datadoghq.com
45482+
description: The regional site for customers.
45483+
enum:
45484+
- datadoghq.com
45485+
- us3.datadoghq.com
45486+
- us5.datadoghq.com
45487+
- ap1.datadoghq.com
45488+
- datadoghq.eu
45489+
- ddog-gov.com
45490+
subdomain:
45491+
default: event-management-intake
45492+
description: The subdomain where the API is deployed.
45493+
- url: '{protocol}://{name}'
45494+
variables:
45495+
name:
45496+
default: event-management-intake.datadoghq.com
45497+
description: Full site DNS name.
45498+
protocol:
45499+
default: https
45500+
description: The protocol for accessing the API.
45501+
- url: https://{subdomain}.{site}
45502+
variables:
45503+
site:
45504+
default: datadoghq.com
45505+
description: Any Datadog deployment.
45506+
subdomain:
45507+
default: event-management-intake
45508+
description: The subdomain where the API is deployed.
4535945509
summary: Post an event
4536045510
tags:
4536145511
- Events

examples/v2/events/CreateEvent.ts

+3
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,8 +43,10 @@ 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"],
49+
timestamp: "2025-01-15T01:30:15.010000Z",
4750
title: "payment_processed feature flag updated",
4851
},
4952
type: "event",

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"], "timestamp": "2025-01-15T01:30:15.010000Z", "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"], "timestamp": "2025-01-15T01:30:15.010000Z", "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

0 commit comments

Comments
 (0)