Skip to content
Open
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
7 changes: 7 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102212,6 +102212,13 @@ paths:
get:
description: Get the list of all critical assets.
operationId: ListSecurityMonitoringCriticalAssets
parameters:
- description: Query string.
in: query
name: query
required: false
schema:
type: string
responses:
'200':
content:
Expand Down
17 changes: 8 additions & 9 deletions examples/v1/dashboards/SendPublicDashboardInvitation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

# there is a valid "shared_dashboard" in the system
SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"]

body = DatadogAPIClient::V1::SharedDashboardInvites.new({
data: DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({
attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({
email: "exampledashboard@datadoghq.com",
data: [
DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({
attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({
email: "test@datadoghq.com",
}),
type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
}),
type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
}),
],
})
p api_instance.send_public_dashboard_invitation(SHARED_DASHBOARD_TOKEN, body)
p api_instance.send_public_dashboard_invitation("token", body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Send shared dashboard invitation email returns "OK"

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

# there is a valid "shared_dashboard" in the system
SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"]

body = DatadogAPIClient::V1::SharedDashboardInvites.new({
data: DatadogAPIClient::V1::SharedDashboardInvitesDataObject.new({
attributes: DatadogAPIClient::V1::SharedDashboardInvitesDataObjectAttributes.new({
email: "exampledashboard@datadoghq.com",
}),
type: DatadogAPIClient::V1::DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
}),
})
p api_instance.send_public_dashboard_invitation(SHARED_DASHBOARD_TOKEN, body)
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,9 @@
"filter_operating_system_name" => "String",
"filter_operating_system_version" => "String",
},
"v2.ListSecurityMonitoringCriticalAssets" => {
"query" => "String",
},
"v2.CreateSecurityMonitoringCriticalAsset" => {
"body" => "SecurityMonitoringCriticalAssetCreateRequest",
},
Expand Down
12 changes: 10 additions & 2 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1358,17 +1358,25 @@ Feature: Dashboards
Then the response status is 404 Not Found

@team:DataDog/reporting-and-sharing
Scenario: Send shared dashboard invitation email returns "OK" response
Scenario: Send shared dashboard invitation email returns "OK"
Given there is a valid "dashboard" in the system
And there is a valid "shared_dashboard" in the system
And new "SendPublicDashboardInvitation" request
And request contains "token" parameter from "shared_dashboard.token"
And body with value {"data": {"attributes": {"email": "{{unique_lower_alnum}}@datadoghq.com"}, "type": "public_dashboard_invitation"}}
When the request is sent
Then the response status is 201 OK
And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[0]"
And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[1]"
And the response "data.attributes.share_token" has the same value as "shared_dashboard.token"

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Send shared dashboard invitation email returns "OK" response
Given new "SendPublicDashboardInvitation" request
And request contains "token" parameter from "REPLACE.ME"
And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]}
When the request is sent
Then the response status is 201 OK

@generated @skip @team:DataDog/dashboards-backend
Scenario: Update a dashboard returns "Bad Request" response
Given new "UpdateDashboard" request
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/v2/api/security_monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4326,6 +4326,7 @@ def list_security_monitoring_critical_assets(opts = {})
# Get the list of all critical assets.
#
# @param opts [Hash] the optional parameters
# @option opts [String] :query Query string.
# @return [Array<(SecurityMonitoringCriticalAssetsResponse, Integer, Hash)>] SecurityMonitoringCriticalAssetsResponse data, response status code and response headers
def list_security_monitoring_critical_assets_with_http_info(opts = {})

Expand All @@ -4337,6 +4338,7 @@ def list_security_monitoring_critical_assets_with_http_info(opts = {})

# query parameters
query_params = opts[:query_params] || {}
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
Loading