Skip to content

Commit 3d9b63f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add routes for managing On-Call user notification channels (#2828)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 7ed176c commit 3d9b63f

File tree

38 files changed

+3216
-0
lines changed

38 files changed

+3216
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 428 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-12T14:05:32.425Z

cassettes/features/v2/on-call/Create-an-On-Call-notification-channel-for-a-user-returns-Created-response.yml

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-11T18:27:50.679Z

cassettes/features/v2/on-call/Delete-an-On-Call-notification-channel-for-a-user-returns-No-Content-response.yml

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-12T14:04:17.257Z

cassettes/features/v2/on-call/Get-an-On-Call-notification-channel-for-a-user-returns-OK-response.yml

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-12T14:40:40.219Z

cassettes/features/v2/on-call/List-On-Call-notification-channels-for-a-user-returns-OK-response.yml

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Create an On-Call notification channel for a user returns "Created" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::OnCallAPI.new
5+
6+
# there is a valid "user" in the system
7+
USER_DATA_ID = ENV["USER_DATA_ID"]
8+
9+
body = DatadogAPIClient::V2::CreateUserNotificationChannelRequest.new({
10+
data: DatadogAPIClient::V2::CreateNotificationChannelData.new({
11+
attributes: DatadogAPIClient::V2::CreateNotificationChannelAttributes.new({
12+
config: DatadogAPIClient::V2::CreateEmailNotificationChannelConfig.new({
13+
address: "[email protected]",
14+
formats: [
15+
DatadogAPIClient::V2::NotificationChannelEmailFormatType::HTML,
16+
],
17+
type: DatadogAPIClient::V2::NotificationChannelEmailConfigType::EMAIL,
18+
}),
19+
}),
20+
type: DatadogAPIClient::V2::NotificationChannelType::NOTIFICATION_CHANNELS,
21+
}),
22+
})
23+
p api_instance.create_user_notification_channel(USER_DATA_ID, body)

0 commit comments

Comments
 (0)