Skip to content

Commit f3090fb

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Documentation: merged 'Team Connections' into 'Teams' section (#2800)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 792bdad commit f3090fb

15 files changed

+359
-398
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83879,7 +83879,7 @@ paths:
8387983879
- teams_read
8388083880
summary: Delete team connections
8388183881
tags:
83882-
- Team Connections
83882+
- Teams
8388383883
x-permission:
8388483884
operator: OR
8388583885
permissions:
@@ -83958,7 +83958,7 @@ paths:
8395883958
- teams_read
8395983959
summary: List team connections
8396083960
tags:
83961-
- Team Connections
83961+
- Teams
8396283962
x-pagination:
8396383963
limitParam: page[size]
8396483964
pageParam: page[number]
@@ -84002,7 +84002,7 @@ paths:
8400284002
- teams_read
8400384003
summary: Create team connections
8400484004
tags:
84005-
- Team Connections
84005+
- Teams
8400684006
x-permission:
8400784007
operator: OR
8400884008
permissions:
@@ -87323,9 +87323,6 @@ tags:
8732387323
use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more
8732487324
information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)."
8732587325
name: Synthetics
87326-
- description: View and manage relationships between Datadog teams and teams from
87327-
external sources, such as GitHub.
87328-
name: Team Connections
8732987326
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/)
8733087327
for more information.
8733187328
name: Teams

examples/v2/team-connections/CreateTeamConnections.rb renamed to examples/v2/teams/CreateTeamConnections.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.create_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88

99
# there is a valid "dd_team" in the system
1010
DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"]

examples/v2/team-connections/DeleteTeamConnections.rb renamed to examples/v2/teams/DeleteTeamConnections.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.delete_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88

99
body = DatadogAPIClient::V2::TeamConnectionDeleteRequest.new({
1010
data: [

examples/v2/team-connections/ListTeamConnections.rb renamed to examples/v2/teams/ListTeamConnections.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.list_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88
p api_instance.list_team_connections()

examples/v2/team-connections/ListTeamConnections_1473516764.rb renamed to examples/v2/teams/ListTeamConnections_1473516764.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.list_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88
opts = {
99
filter_sources: [
1010
"github",

examples/v2/team-connections/ListTeamConnections_2418873869.rb renamed to examples/v2/teams/ListTeamConnections_2418873869.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
DatadogAPIClient.configure do |config|
55
config.unstable_operations["v2.list_team_connections".to_sym] = true
66
end
7-
api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
88
api_instance.list_team_connections_with_pagination() { |item| puts item }

features/scenarios_model_mapping.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3173,6 +3173,20 @@
31733173
"v2.GetTeamHierarchyLink" => {
31743174
"link_id" => "String",
31753175
},
3176+
"v2.DeleteTeamConnections" => {
3177+
"body" => "TeamConnectionDeleteRequest",
3178+
},
3179+
"v2.ListTeamConnections" => {
3180+
"page_size" => "Integer",
3181+
"page_number" => "Integer",
3182+
"filter_sources" => "Array<String>",
3183+
"filter_team_ids" => "Array<String>",
3184+
"filter_connected_team_ids" => "Array<String>",
3185+
"filter_connection_ids" => "Array<String>",
3186+
},
3187+
"v2.CreateTeamConnections" => {
3188+
"body" => "TeamConnectionCreateRequest",
3189+
},
31763190
"v2.GetTeamSync" => {
31773191
"filter_source" => "TeamSyncAttributesSource",
31783192
},
@@ -3254,20 +3268,6 @@
32543268
"v2.GetUserMemberships" => {
32553269
"user_uuid" => "String",
32563270
},
3257-
"v2.DeleteTeamConnections" => {
3258-
"body" => "TeamConnectionDeleteRequest",
3259-
},
3260-
"v2.ListTeamConnections" => {
3261-
"page_size" => "Integer",
3262-
"page_number" => "Integer",
3263-
"filter_sources" => "Array<String>",
3264-
"filter_team_ids" => "Array<String>",
3265-
"filter_connected_team_ids" => "Array<String>",
3266-
"filter_connection_ids" => "Array<String>",
3267-
},
3268-
"v2.CreateTeamConnections" => {
3269-
"body" => "TeamConnectionCreateRequest",
3270-
},
32713271
"v2.ListIncidentTeams" => {
32723272
"include" => "IncidentRelatedObject",
32733273
"page_size" => "Integer",

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@
12091209
"source": "data.data[0]",
12101210
"step": "there is a valid \"team_connection\" in the system",
12111211
"key": "team_connection",
1212-
"tag": "Team Connections",
1212+
"tag": "Teams",
12131213
"operationId": "CreateTeamConnections"
12141214
},
12151215
{

features/v2/team_connections.feature

Lines changed: 0 additions & 93 deletions
This file was deleted.

features/v2/teams.feature

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,60 @@ Feature: Teams
115115
And the response "data.attributes.visible_modules" is equal to ["m1","m2"]
116116
And the response "data.attributes.hidden_modules" is equal to ["m3"]
117117

118+
@skip @team:DataDog/aaa-omg
119+
Scenario: Create team connections returns "Bad Request" response
120+
Given operation "CreateTeamConnections" enabled
121+
And new "CreateTeamConnections" request
122+
And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]}
123+
When the request is sent
124+
Then the response status is 400 Bad Request
125+
126+
@generated @skip @team:DataDog/aaa-omg
127+
Scenario: Create team connections returns "Conflict" response
128+
Given operation "CreateTeamConnections" enabled
129+
And new "CreateTeamConnections" request
130+
And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]}
131+
When the request is sent
132+
Then the response status is 409 Conflict
133+
134+
@skip @team:DataDog/aaa-omg
135+
Scenario: Create team connections returns "Created" response
136+
Given operation "CreateTeamConnections" enabled
137+
And new "CreateTeamConnections" request
138+
And there is a valid "dd_team" in the system
139+
And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]}
140+
When the request is sent
141+
Then the response status is 201 Created
142+
And the response "data.data[0].attributes.source" is equal to "github"
143+
And the response "data.data[0].attributes.managed_by" is equal to "datadog"
144+
And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}"
145+
And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name"
146+
And the response "data.data[0].type" is equal to "team_connection"
147+
148+
@skip @team:DataDog/aaa-omg
149+
Scenario: Delete team connections returns "Bad Request" response
150+
Given operation "DeleteTeamConnections" enabled
151+
And new "DeleteTeamConnections" request
152+
And body with value {"data": [{"type": "team_connection"}]}
153+
When the request is sent
154+
Then the response status is 400 Bad Request
155+
156+
@generated @skip @team:DataDog/aaa-omg
157+
Scenario: Delete team connections returns "No Content" response
158+
Given operation "DeleteTeamConnections" enabled
159+
And new "DeleteTeamConnections" request
160+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
161+
When the request is sent
162+
Then the response status is 204 No Content
163+
164+
@generated @skip @team:DataDog/aaa-omg
165+
Scenario: Delete team connections returns "Not Found" response
166+
Given operation "DeleteTeamConnections" enabled
167+
And new "DeleteTeamConnections" request
168+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
169+
When the request is sent
170+
Then the response status is 404 Not Found
171+
118172
@team:DataDog/aaa-omg
119173
Scenario: Get a team hierarchy link returns "API error response." response
120174
Given new "GetTeamHierarchyLink" request
@@ -341,6 +395,36 @@ Feature: Teams
341395
When the request is sent
342396
Then the response status is 200 OK
343397

398+
@generated @skip @team:DataDog/aaa-omg
399+
Scenario: List team connections returns "Bad Request" response
400+
Given operation "ListTeamConnections" enabled
401+
And new "ListTeamConnections" request
402+
When the request is sent
403+
Then the response status is 400 Bad Request
404+
405+
@generated @skip @team:DataDog/aaa-omg
406+
Scenario: List team connections returns "OK" response
407+
Given operation "ListTeamConnections" enabled
408+
And new "ListTeamConnections" request
409+
When the request is sent
410+
Then the response status is 200 OK
411+
412+
@generated @skip @team:DataDog/aaa-omg @with-pagination
413+
Scenario: List team connections returns "OK" response with pagination
414+
Given operation "ListTeamConnections" enabled
415+
And new "ListTeamConnections" request
416+
When the request with pagination is sent
417+
Then the response status is 200 OK
418+
419+
@skip @team:DataDog/aaa-omg
420+
Scenario: List team connections with filters returns "OK" response
421+
Given operation "ListTeamConnections" enabled
422+
And new "ListTeamConnections" request
423+
And request contains "filter[sources]" parameter with value ["github"]
424+
And request contains "page[size]" parameter with value 10
425+
When the request is sent
426+
Then the response status is 200 OK
427+
344428
@generated @skip @team:DataDog/aaa-omg
345429
Scenario: Remove a member team returns "API error response." response
346430
Given operation "RemoveMemberTeam" enabled

0 commit comments

Comments
 (0)