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
721 changes: 721 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions examples/v2/rum-teams-ownership/CreateTeamsOwnershipMapping.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Create a teams ownership mapping returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_teams_ownership_mapping".to_sym] = true
end
api_instance = DatadogAPIClient::V2::RumTeamsOwnershipAPI.new

body = DatadogAPIClient::V2::TeamsOwnershipMappingCreateRequest.new({
data: DatadogAPIClient::V2::TeamsOwnershipMappingCreateData.new({
attributes: DatadogAPIClient::V2::TeamsOwnershipMappingCreateDataAttributes.new({
application_id: "11111111-2222-3333-4444-555555555555",
match_type: DatadogAPIClient::V2::TeamsOwnershipMatchType::EXACT,
service: "web-checkout",
team_handle: "team-rum",
view_name: "/checkout",
}),
type: DatadogAPIClient::V2::TeamsOwnershipMappingType::TEAMS_OWNERSHIP_MAPPINGS,
}),
})
p api_instance.create_teams_ownership_mapping(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create teams ownership mapping returns "Created" response

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

body = DatadogAPIClient::V2::TeamsOwnershipMappingCreateRequest.new({
data: DatadogAPIClient::V2::TeamsOwnershipMappingCreateData.new({
type: DatadogAPIClient::V2::TeamsOwnershipMappingType::TEAMS_OWNERSHIP_MAPPINGS,
attributes: DatadogAPIClient::V2::TeamsOwnershipMappingCreateDataAttributes.new({
team_handle: "team-rum",
view_name: "/checkout",
service: "web-checkout",
application_id: "11111111-2222-3333-4444-555555555555",
match_type: DatadogAPIClient::V2::TeamsOwnershipMatchType::EXACT,
}),
}),
})
p api_instance.create_teams_ownership_mapping(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Bulk create and remove teams ownership mappings returns "OK" response

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

body = DatadogAPIClient::V2::TeamsOwnershipMappingBatchRequest.new({
atomic_operations: [
DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperation.new({
op: DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperationOp::ADD,
data: DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperationData.new({
type: DatadogAPIClient::V2::TeamsOwnershipMappingType::TEAMS_OWNERSHIP_MAPPINGS,
attributes: DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperationDataAttributes.new({
team_handle: "team-rum",
view_name: "/checkout",
service: "web-checkout",
application_id: "11111111-2222-3333-4444-555555555555",
match_type: DatadogAPIClient::V2::TeamsOwnershipMatchType::EXACT,
}),
}),
}),
DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperation.new({
op: DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperationOp::REMOVE,
ref: DatadogAPIClient::V2::TeamsOwnershipMappingBatchOperationRef.new({
type: DatadogAPIClient::V2::TeamsOwnershipMappingType::TEAMS_OWNERSHIP_MAPPINGS,
id: "456",
}),
}),
],
})
p api_instance.create_teams_ownership_mappings_batch(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a teams ownership mapping returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RumTeamsOwnershipAPI.new
api_instance.delete_teams_ownership_mapping("123")
5 changes: 5 additions & 0 deletions examples/v2/rum-teams-ownership/GetTeamsOwnershipMapping.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a teams ownership mapping returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RumTeamsOwnershipAPI.new
p api_instance.get_teams_ownership_mapping("123")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List teams ownership mappings returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RumTeamsOwnershipAPI.new
p api_instance.list_teams_ownership_mappings()
5 changes: 5 additions & 0 deletions examples/v2/rum-teams-ownership/ListTeamsOwnershipRules.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List teams ownership rules returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RumTeamsOwnershipAPI.new
p api_instance.list_teams_ownership_rules()
24 changes: 24 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5420,6 +5420,30 @@
"metric_id" => "String",
"body" => "RumMetricUpdateRequest",
},
"v2.ListTeamsOwnershipMappings" => {
"filter_view_name" => "Array<String>",
"filter_team_handle" => "Array<String>",
"filter_application_id" => "Array<UUID>",
"filter_service" => "Array<String>",
},
"v2.CreateTeamsOwnershipMapping" => {
"body" => "TeamsOwnershipMappingCreateRequest",
},
"v2.CreateTeamsOwnershipMappingsBatch" => {
"body" => "TeamsOwnershipMappingBatchRequest",
},
"v2.DeleteTeamsOwnershipMapping" => {
"id" => "String",
},
"v2.GetTeamsOwnershipMapping" => {
"id" => "String",
},
"v2.ListTeamsOwnershipRules" => {
"filter_view_name" => "Array<String>",
"filter_team_handle" => "Array<String>",
"filter_application_id" => "Array<UUID>",
"filter_service" => "Array<String>",
},
"v2.CreateRUMOperation" => {
"body" => "RUMOperationCreateRequest",
},
Expand Down
127 changes: 127 additions & 0 deletions features/v2/rum_teams_ownership.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
@endpoint(rum-teams-ownership) @endpoint(rum-teams-ownership-v2)
Feature: Rum Teams Ownership
Manage [teams ownership](https://docs.datadoghq.com/real_user_monitoring/p
latform/ownership/) mappings between RUM views and the teams that own
them.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "RumTeamsOwnership" API

@team:DataDog/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "Bad Request" response
Given new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"invalid-uuid","match_type":"exact"}}}]}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "Bad Request. One or more operations failed validation, so none of the operations were applied." response
Given operation "CreateTeamsOwnershipMappingsBatch" enabled
And new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations": [{"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}, "op": "add", "ref": {"id": "456", "type": "teams_ownership_mappings"}}]}
When the request is sent
Then the response status is 400 Bad Request. One or more operations failed validation, so none of the operations were applied.

@team:DataDog/rum-backend
Scenario: Bulk create and remove teams ownership mappings returns "OK" response
Given new "CreateTeamsOwnershipMappingsBatch" request
And body with value {"atomic:operations":[{"op":"add","data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"11111111-2222-3333-4444-555555555555","match_type":"exact"}}},{"op":"remove","ref":{"type":"teams_ownership_mappings","id":"456"}}]}
When the request is sent
Then the response status is 200 OK
And the response "atomic:results[0].data.type" is equal to "teams_ownership_mappings"
And the response "atomic:results[0].data.attributes.team_handle" is equal to "team-rum"
And the response "atomic:results[0].data.attributes.match_type" is equal to "exact"

@generated @skip @team:DataDog/rum-backend
Scenario: Create a teams ownership mapping returns "Bad Request" response
Given operation "CreateTeamsOwnershipMapping" enabled
And new "CreateTeamsOwnershipMapping" request
And body with value {"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Create a teams ownership mapping returns "Created" response
Given operation "CreateTeamsOwnershipMapping" enabled
And new "CreateTeamsOwnershipMapping" request
And body with value {"data": {"attributes": {"application_id": "11111111-2222-3333-4444-555555555555", "match_type": "exact", "service": "web-checkout", "team_handle": "team-rum", "view_name": "/checkout"}, "type": "teams_ownership_mappings"}}
When the request is sent
Then the response status is 201 Created

@team:DataDog/rum-backend
Scenario: Create teams ownership mapping returns "Bad Request" response
Given new "CreateTeamsOwnershipMapping" request
And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"invalid-uuid","match_type":"exact"}}}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/rum-backend
Scenario: Create teams ownership mapping returns "Created" response
Given new "CreateTeamsOwnershipMapping" request
And body with value {"data":{"type":"teams_ownership_mappings","attributes":{"team_handle":"team-rum","view_name":"/checkout","service":"web-checkout","application_id":"11111111-2222-3333-4444-555555555555","match_type":"exact"}}}
When the request is sent
Then the response status is 201 Created
And the response "data.type" is equal to "teams_ownership_mappings"
And the response "data.attributes.team_handle" is equal to "team-rum"
And the response "data.attributes.view_name" is equal to "/checkout"
And the response "data.attributes.service" is equal to "web-checkout"
And the response "data.attributes.application_id" is equal to "11111111-2222-3333-4444-555555555555"
And the response "data.attributes.match_type" is equal to "exact"

@team:DataDog/rum-backend
Scenario: Delete a teams ownership mapping returns "No Content" response
Given new "DeleteTeamsOwnershipMapping" request
And request contains "id" parameter with value "123"
When the request is sent
Then the response status is 204 No Content

@team:DataDog/rum-backend
Scenario: Delete a teams ownership mapping returns "Not Found" response
Given new "DeleteTeamsOwnershipMapping" request
And request contains "id" parameter with value "{{ unique }}"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/rum-backend
Scenario: Get a teams ownership mapping returns "Not Found" response
Given new "GetTeamsOwnershipMapping" request
And request contains "id" parameter with value "{{ unique }}"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/rum-backend
Scenario: Get a teams ownership mapping returns "OK" response
Given new "GetTeamsOwnershipMapping" request
And request contains "id" parameter with value "123"
When the request is sent
Then the response status is 200 OK
And the response "data.id" is equal to "123"
And the response "data.type" is equal to "teams_ownership_mappings"
And the response "data.attributes.team_handle" is equal to "team-rum"
And the response "data.attributes.view_name" is equal to "/checkout"
And the response "data.attributes.match_type" is equal to "exact"

@team:DataDog/rum-backend
Scenario: List teams ownership mappings returns "OK" response
Given new "ListTeamsOwnershipMappings" request
When the request is sent
Then the response status is 200 OK
And the response "data" has length 1
And the response "data[0].type" is equal to "teams_ownership_mappings"
And the response "data[0].attributes.team_handle" is equal to "team-rum"
And the response "data[0].attributes.view_name" is equal to "/checkout"
And the response "data[0].attributes.service" is equal to "web-checkout"
And the response "data[0].attributes.application_id" is equal to "11111111-2222-3333-4444-555555555555"
And the response "data[0].attributes.match_type" is equal to "exact"

@team:DataDog/rum-backend
Scenario: List teams ownership rules returns "OK" response
Given new "ListTeamsOwnershipRules" request
When the request is sent
Then the response status is 200 OK
And the response "data" has length 1
And the response "data[0].type" is equal to "teams_ownership_grouped_mappings"
And the response "data[0].attributes.view_name" is equal to "/checkout"
And the response "data[0].attributes.match_type" is equal to "exact"
45 changes: 45 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7057,6 +7057,51 @@
"type": "idempotent"
}
},
"ListTeamsOwnershipMappings": {
"tag": "Rum Teams Ownership",
"undo": {
"type": "safe"
}
},
"CreateTeamsOwnershipMapping": {
"tag": "Rum Teams Ownership",
"undo": {
"operationId": "DeleteTeamsOwnershipMapping",
"parameters": [
{
"name": "id",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"CreateTeamsOwnershipMappingsBatch": {
"tag": "Rum Teams Ownership",
"undo": {
"operationId": "CreateTeamsOwnershipMappingsBatch",
"parameters": [],
"type": "unsafe"
}
},
"DeleteTeamsOwnershipMapping": {
"tag": "Rum Teams Ownership",
"undo": {
"type": "idempotent"
}
},
"GetTeamsOwnershipMapping": {
"tag": "Rum Teams Ownership",
"undo": {
"type": "safe"
}
},
"ListTeamsOwnershipRules": {
"tag": "Rum Teams Ownership",
"undo": {
"type": "safe"
}
},
"ListRUMEvents": {
"tag": "RUM",
"undo": {
Expand Down
6 changes: 6 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,12 @@ def initialize
"v2.create_rum_config": false,
"v2.get_rum_config": false,
"v2.update_rum_config": false,
"v2.create_teams_ownership_mapping": false,
"v2.create_teams_ownership_mappings_batch": false,
"v2.delete_teams_ownership_mapping": false,
"v2.get_teams_ownership_mapping": false,
"v2.list_teams_ownership_mappings": false,
"v2.list_teams_ownership_rules": false,
"v2.create_rum_operation": false,
"v2.create_rum_operation_strong_link": false,
"v2.delete_rum_operation": false,
Expand Down
25 changes: 25 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8015,6 +8015,30 @@ def overrides
"v2.teams_hierarchy_links_response_links" => "TeamsHierarchyLinksResponseLinks",
"v2.teams_hierarchy_links_response_meta" => "TeamsHierarchyLinksResponseMeta",
"v2.teams_hierarchy_links_response_meta_page" => "TeamsHierarchyLinksResponseMetaPage",
"v2.teams_ownership_mapping_batch_error" => "TeamsOwnershipMappingBatchError",
"v2.teams_ownership_mapping_batch_operation" => "TeamsOwnershipMappingBatchOperation",
"v2.teams_ownership_mapping_batch_operation_data" => "TeamsOwnershipMappingBatchOperationData",
"v2.teams_ownership_mapping_batch_operation_data_attributes" => "TeamsOwnershipMappingBatchOperationDataAttributes",
"v2.teams_ownership_mapping_batch_operation_op" => "TeamsOwnershipMappingBatchOperationOp",
"v2.teams_ownership_mapping_batch_operation_ref" => "TeamsOwnershipMappingBatchOperationRef",
"v2.teams_ownership_mapping_batch_request" => "TeamsOwnershipMappingBatchRequest",
"v2.teams_ownership_mapping_batch_response" => "TeamsOwnershipMappingBatchResponse",
"v2.teams_ownership_mapping_batch_result" => "TeamsOwnershipMappingBatchResult",
"v2.teams_ownership_mapping_batch_result_data" => "TeamsOwnershipMappingBatchResultData",
"v2.teams_ownership_mapping_create_data" => "TeamsOwnershipMappingCreateData",
"v2.teams_ownership_mapping_create_data_attributes" => "TeamsOwnershipMappingCreateDataAttributes",
"v2.teams_ownership_mapping_create_request" => "TeamsOwnershipMappingCreateRequest",
"v2.teams_ownership_mapping_response" => "TeamsOwnershipMappingResponse",
"v2.teams_ownership_mapping_response_attributes" => "TeamsOwnershipMappingResponseAttributes",
"v2.teams_ownership_mapping_response_data" => "TeamsOwnershipMappingResponseData",
"v2.teams_ownership_mappings_response" => "TeamsOwnershipMappingsResponse",
"v2.teams_ownership_mapping_type" => "TeamsOwnershipMappingType",
"v2.teams_ownership_match_type" => "TeamsOwnershipMatchType",
"v2.teams_ownership_rule_response_attributes" => "TeamsOwnershipRuleResponseAttributes",
"v2.teams_ownership_rule_response_data" => "TeamsOwnershipRuleResponseData",
"v2.teams_ownership_rules_response" => "TeamsOwnershipRulesResponse",
"v2.teams_ownership_rule_team_mapping" => "TeamsOwnershipRuleTeamMapping",
"v2.teams_ownership_rule_type" => "TeamsOwnershipRuleType",
"v2.teams_response" => "TeamsResponse",
"v2.teams_response_links" => "TeamsResponseLinks",
"v2.teams_response_meta" => "TeamsResponseMeta",
Expand Down Expand Up @@ -8640,6 +8664,7 @@ def overrides
"v2.rum_replay_sessions_api" => "RumReplaySessionsAPI",
"v2.rum_replay_viewership_api" => "RumReplayViewershipAPI",
"v2.rum_retention_filters_api" => "RumRetentionFiltersAPI",
"v2.rum_teams_ownership_api" => "RumTeamsOwnershipAPI",
"v2.salesforce_integration_api" => "SalesforceIntegrationAPI",
"v2.scorecards_api" => "ScorecardsAPI",
"v2.seats_api" => "SeatsAPI",
Expand Down
Loading
Loading