Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
428 changes: 428 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-12T14:05:32.425Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-11T18:27:50.679Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-12T14:04:17.257Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-12T14:40:40.219Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions examples/v2/on-call/CreateUserNotificationChannel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Create an On-Call notification channel for a user returns "Created" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OnCallAPI.new

# there is a valid "user" in the system
USER_DATA_ID = ENV["USER_DATA_ID"]

body = DatadogAPIClient::V2::CreateUserNotificationChannelRequest.new({
data: DatadogAPIClient::V2::CreateNotificationChannelData.new({
attributes: DatadogAPIClient::V2::CreateNotificationChannelAttributes.new({
config: DatadogAPIClient::V2::CreateEmailNotificationChannelConfig.new({
address: "[email protected]",
formats: [
DatadogAPIClient::V2::NotificationChannelEmailFormatType::HTML,
],
type: DatadogAPIClient::V2::NotificationChannelEmailConfigType::EMAIL,
}),
}),
type: DatadogAPIClient::V2::NotificationChannelType::NOTIFICATION_CHANNELS,
}),
})
p api_instance.create_user_notification_channel(USER_DATA_ID, body)
11 changes: 11 additions & 0 deletions examples/v2/on-call/DeleteUserNotificationChannel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Delete an On-Call notification channel for a user returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OnCallAPI.new

# there is a valid "user" in the system
USER_DATA_ID = ENV["USER_DATA_ID"]

# there is a valid "oncall_email_notification_channel" in the system
ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID = ENV["ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID"]
api_instance.delete_user_notification_channel(USER_DATA_ID, ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID)
11 changes: 11 additions & 0 deletions examples/v2/on-call/GetUserNotificationChannel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Get an On-Call notification channel for a user returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OnCallAPI.new

# there is a valid "user" in the system
USER_DATA_ID = ENV["USER_DATA_ID"]

# there is a valid "oncall_email_notification_channel" in the system
ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID = ENV["ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID"]
p api_instance.get_user_notification_channel(USER_DATA_ID, ONCALL_EMAIL_NOTIFICATION_CHANNEL_DATA_ID)
8 changes: 8 additions & 0 deletions examples/v2/on-call/ListUserNotificationChannels.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List On-Call notification channels for a user returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OnCallAPI.new

# there is a valid "user" in the system
USER_DATA_ID = ENV["USER_DATA_ID"]
p api_instance.list_user_notification_channels(USER_DATA_ID)
Loading
Loading