Skip to content

Commit 08cfb30

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 581537ee of spec repo
1 parent 375c92b commit 08cfb30

File tree

15 files changed

+882
-4
lines changed

15 files changed

+882
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-05-20 07:21:24.854718",
8-
"spec_repo_commit": "fec20f97"
7+
"regenerated": "2025-05-22 20:06:35.816296",
8+
"spec_repo_commit": "581537ee"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-20 07:21:24.871057",
13-
"spec_repo_commit": "fec20f97"
12+
"regenerated": "2025-05-22 20:06:35.832153",
13+
"spec_repo_commit": "581537ee"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,6 +2157,14 @@ components:
21572157
type: string
21582158
x-enum-varnames:
21592159
- BILLING_DIMENSIONS
2160+
AddMemberTeamRequest:
2161+
description: Request to add a member team to super team's hierarchy
2162+
properties:
2163+
data:
2164+
$ref: '#/components/schemas/MemberTeam'
2165+
required:
2166+
- data
2167+
type: object
21602168
Advisory:
21612169
description: Advisory.
21622170
properties:
@@ -20814,6 +20822,28 @@ components:
2081420822
- ms_channel_name
2081520823
- redirect_url
2081620824
type: object
20825+
MemberTeam:
20826+
description: A member team
20827+
properties:
20828+
id:
20829+
description: The member team's identifier
20830+
example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
20831+
type: string
20832+
type:
20833+
$ref: '#/components/schemas/MemberTeamType'
20834+
required:
20835+
- id
20836+
- type
20837+
type: object
20838+
MemberTeamType:
20839+
default: member_teams
20840+
description: Member team type
20841+
enum:
20842+
- member_teams
20843+
example: member_teams
20844+
type: string
20845+
x-enum-varnames:
20846+
- MEMBER_TEAMS
2081720847
Metadata:
2081820848
description: The metadata related to this request.
2081920849
properties:
@@ -59331,6 +59361,165 @@ paths:
5933159361
permissions:
5933259362
- teams_read
5933359363
- teams_manage
59364+
/api/v2/team/{super_team_id}/member_teams:
59365+
get:
59366+
description: 'Get all member teams.
59367+
59368+
Can be used to search for member teams using the `filter[indirect]` query
59369+
parameters.'
59370+
operationId: ListMemberTeams
59371+
parameters:
59372+
- description: None
59373+
in: path
59374+
name: super_team_id
59375+
required: true
59376+
schema:
59377+
type: string
59378+
- $ref: '#/components/parameters/PageSize'
59379+
- $ref: '#/components/parameters/PageNumber'
59380+
- description: List of fields that need to be fetched.
59381+
explode: false
59382+
in: query
59383+
name: fields[team]
59384+
required: false
59385+
schema:
59386+
items:
59387+
$ref: '#/components/schemas/TeamsField'
59388+
type: array
59389+
- description: When true, return both direct and indirect member teams
59390+
in: query
59391+
name: filter[indirect]
59392+
required: false
59393+
schema:
59394+
type: boolean
59395+
responses:
59396+
'200':
59397+
content:
59398+
application/json:
59399+
schema:
59400+
$ref: '#/components/schemas/TeamResponse'
59401+
description: OK
59402+
'403':
59403+
$ref: '#/components/responses/ForbiddenResponse'
59404+
'404':
59405+
content:
59406+
application/json:
59407+
schema:
59408+
$ref: '#/components/schemas/APIErrorResponse'
59409+
description: API error response.
59410+
'429':
59411+
$ref: '#/components/responses/TooManyRequestsResponse'
59412+
security:
59413+
- apiKeyAuth: []
59414+
appKeyAuth: []
59415+
- AuthZ:
59416+
- teams_read
59417+
summary: Get all member teams
59418+
tags:
59419+
- Teams
59420+
x-pagination:
59421+
limitParam: page[size]
59422+
pageParam: page[number]
59423+
resultsPath: data
59424+
x-permission:
59425+
operator: OR
59426+
permissions:
59427+
- teams_read
59428+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
59429+
59430+
contact [Datadog support](https://docs.datadoghq.com/help/).'
59431+
post:
59432+
description: 'Add a member team.
59433+
59434+
Adds the team given by the `id` in the body as a member team of the super
59435+
team.'
59436+
operationId: AddMemberTeam
59437+
parameters:
59438+
- description: None
59439+
in: path
59440+
name: super_team_id
59441+
required: true
59442+
schema:
59443+
type: string
59444+
requestBody:
59445+
content:
59446+
application/json:
59447+
schema:
59448+
$ref: '#/components/schemas/AddMemberTeamRequest'
59449+
required: true
59450+
responses:
59451+
'204':
59452+
description: Added
59453+
'403':
59454+
$ref: '#/components/responses/ForbiddenResponse'
59455+
'409':
59456+
content:
59457+
application/json:
59458+
schema:
59459+
$ref: '#/components/schemas/APIErrorResponse'
59460+
description: API error response.
59461+
'429':
59462+
$ref: '#/components/responses/TooManyRequestsResponse'
59463+
security:
59464+
- apiKeyAuth: []
59465+
appKeyAuth: []
59466+
- AuthZ:
59467+
- teams_read
59468+
summary: Add a member team
59469+
tags:
59470+
- Teams
59471+
x-permission:
59472+
operator: OR
59473+
permissions:
59474+
- teams_read
59475+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
59476+
59477+
contact [Datadog support](https://docs.datadoghq.com/help/).'
59478+
/api/v2/team/{super_team_id}/member_teams/{member_team_id}:
59479+
delete:
59480+
description: Remove a super team's member team represented by `member_team_id`.
59481+
operationId: RemoveMemberTeam
59482+
parameters:
59483+
- description: None
59484+
in: path
59485+
name: super_team_id
59486+
required: true
59487+
schema:
59488+
type: string
59489+
- description: None
59490+
in: path
59491+
name: member_team_id
59492+
required: true
59493+
schema:
59494+
type: string
59495+
responses:
59496+
'204':
59497+
description: No Content
59498+
'403':
59499+
$ref: '#/components/responses/ForbiddenResponse'
59500+
'404':
59501+
content:
59502+
application/json:
59503+
schema:
59504+
$ref: '#/components/schemas/APIErrorResponse'
59505+
description: API error response.
59506+
'429':
59507+
$ref: '#/components/responses/TooManyRequestsResponse'
59508+
security:
59509+
- apiKeyAuth: []
59510+
appKeyAuth: []
59511+
- AuthZ:
59512+
- teams_read
59513+
summary: Remove a member team
59514+
tags:
59515+
- Teams
59516+
x-permission:
59517+
operator: OR
59518+
permissions:
59519+
- teams_read
59520+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
59521+
59522+
contact [Datadog support](https://docs.datadoghq.com/help/).'
5933459523
/api/v2/team/{team_id}:
5933559524
delete:
5933659525
description: Remove a team using the team's `id`.

examples/v2/teams/AddMemberTeam.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Add a member team returns "Added" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.add_member_team".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
8+
9+
body = DatadogAPIClient::V2::AddMemberTeamRequest.new({
10+
data: DatadogAPIClient::V2::MemberTeam.new({
11+
id: "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
12+
type: DatadogAPIClient::V2::MemberTeamType::MEMBER_TEAMS,
13+
}),
14+
})
15+
api_instance.add_member_team("super_team_id", body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get all member teams returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_member_teams".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
8+
p api_instance.list_member_teams("super_team_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get all member teams returns "OK" response with pagination
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_member_teams".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
8+
api_instance.list_member_teams_with_pagination("super_team_id") { |item| puts item }
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Remove a member team returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.remove_member_team".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
8+
api_instance.remove_member_team("super_team_id", "member_team_id")

features/scenarios_model_mapping.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,6 +2520,21 @@
25202520
"v2.CreateTeam" => {
25212521
"body" => "TeamCreateRequest",
25222522
},
2523+
"v2.ListMemberTeams" => {
2524+
"super_team_id" => "String",
2525+
"page_size" => "Integer",
2526+
"page_number" => "Integer",
2527+
"fields_team" => "Array<TeamsField>",
2528+
"filter_indirect" => "Boolean",
2529+
},
2530+
"v2.AddMemberTeam" => {
2531+
"super_team_id" => "String",
2532+
"body" => "AddMemberTeamRequest",
2533+
},
2534+
"v2.RemoveMemberTeam" => {
2535+
"super_team_id" => "String",
2536+
"member_team_id" => "String",
2537+
},
25232538
"v2.DeleteTeam" => {
25242539
"team_id" => "String",
25252540
},

features/v2/teams.feature

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ Feature: Teams
99
And a valid "appKeyAuth" key in the system
1010
And an instance of "Teams" API
1111

12+
@generated @skip @team:DataDog/core-app
13+
Scenario: Add a member team returns "API error response." response
14+
Given operation "AddMemberTeam" enabled
15+
And new "AddMemberTeam" request
16+
And request contains "super_team_id" parameter from "REPLACE.ME"
17+
And body with value {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "member_teams"}}
18+
When the request is sent
19+
Then the response status is 409 API error response.
20+
21+
@generated @skip @team:DataDog/core-app
22+
Scenario: Add a member team returns "Added" response
23+
Given operation "AddMemberTeam" enabled
24+
And new "AddMemberTeam" request
25+
And request contains "super_team_id" parameter from "REPLACE.ME"
26+
And body with value {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "member_teams"}}
27+
When the request is sent
28+
Then the response status is 204 Added
29+
1230
@generated @skip @team:DataDog/core-app
1331
Scenario: Add a user to a team returns "API error response." response
1432
Given new "CreateTeamMembership" request
@@ -112,6 +130,30 @@ Feature: Teams
112130
When the request is sent
113131
Then the response status is 200 OK
114132

133+
@generated @skip @team:DataDog/core-app
134+
Scenario: Get all member teams returns "API error response." response
135+
Given operation "ListMemberTeams" enabled
136+
And new "ListMemberTeams" request
137+
And request contains "super_team_id" parameter from "REPLACE.ME"
138+
When the request is sent
139+
Then the response status is 404 API error response.
140+
141+
@generated @skip @team:DataDog/core-app
142+
Scenario: Get all member teams returns "OK" response
143+
Given operation "ListMemberTeams" enabled
144+
And new "ListMemberTeams" request
145+
And request contains "super_team_id" parameter from "REPLACE.ME"
146+
When the request is sent
147+
Then the response status is 200 OK
148+
149+
@generated @skip @team:DataDog/core-app @with-pagination
150+
Scenario: Get all member teams returns "OK" response with pagination
151+
Given operation "ListMemberTeams" enabled
152+
And new "ListMemberTeams" request
153+
And request contains "super_team_id" parameter from "REPLACE.ME"
154+
When the request with pagination is sent
155+
Then the response status is 200 OK
156+
115157
@team:DataDog/core-app
116158
Scenario: Get all teams returns "OK" response
117159
Given new "ListTeams" request
@@ -209,6 +251,24 @@ Feature: Teams
209251
Then the response status is 200 Represents a user's association to a team
210252
And the response "data" has length 0
211253

254+
@generated @skip @team:DataDog/core-app
255+
Scenario: Remove a member team returns "API error response." response
256+
Given operation "RemoveMemberTeam" enabled
257+
And new "RemoveMemberTeam" request
258+
And request contains "super_team_id" parameter from "REPLACE.ME"
259+
And request contains "member_team_id" parameter from "REPLACE.ME"
260+
When the request is sent
261+
Then the response status is 404 API error response.
262+
263+
@generated @skip @team:DataDog/core-app
264+
Scenario: Remove a member team returns "No Content" response
265+
Given operation "RemoveMemberTeam" enabled
266+
And new "RemoveMemberTeam" request
267+
And request contains "super_team_id" parameter from "REPLACE.ME"
268+
And request contains "member_team_id" parameter from "REPLACE.ME"
269+
When the request is sent
270+
Then the response status is 204 No Content
271+
212272
@team:DataDog/core-app
213273
Scenario: Remove a team link returns "API error response." response
214274
Given new "DeleteTeamLink" request

0 commit comments

Comments
 (0)