Skip to content

Commit 0714d17

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b359fdcc of spec repo (#2871)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c5d396a commit 0714d17

File tree

13 files changed

+1401
-4
lines changed

13 files changed

+1401
-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-06-16 16:45:03.092535",
8-
"spec_repo_commit": "6e1eb13f"
7+
"regenerated": "2025-06-17 14:55:54.549540",
8+
"spec_repo_commit": "b359fdcc"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-16 16:45:03.110724",
13-
"spec_repo_commit": "6e1eb13f"
12+
"regenerated": "2025-06-17 14:55:54.565207",
13+
"spec_repo_commit": "b359fdcc"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,6 +2200,14 @@ components:
22002200
type: string
22012201
x-enum-varnames:
22022202
- BILLING_DIMENSIONS
2203+
AddMemberTeamRequest:
2204+
description: Request to add a member team to super team's hierarchy
2205+
properties:
2206+
data:
2207+
$ref: '#/components/schemas/MemberTeam'
2208+
required:
2209+
- data
2210+
type: object
22032211
Advisory:
22042212
description: Advisory.
22052213
properties:
@@ -21300,6 +21308,28 @@ components:
2130021308
- ms_channel_name
2130121309
- redirect_url
2130221310
type: object
21311+
MemberTeam:
21312+
description: A member team
21313+
properties:
21314+
id:
21315+
description: The member team's identifier
21316+
example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
21317+
type: string
21318+
type:
21319+
$ref: '#/components/schemas/MemberTeamType'
21320+
required:
21321+
- id
21322+
- type
21323+
type: object
21324+
MemberTeamType:
21325+
default: member_teams
21326+
description: Member team type
21327+
enum:
21328+
- member_teams
21329+
example: member_teams
21330+
type: string
21331+
x-enum-varnames:
21332+
- MEMBER_TEAMS
2130321333
Metadata:
2130421334
description: The metadata related to this request.
2130521335
properties:
@@ -60442,6 +60472,156 @@ paths:
6044260472
permissions:
6044360473
- teams_read
6044460474
- teams_manage
60475+
/api/v2/team/{super_team_id}/member_teams:
60476+
get:
60477+
description: Get all member teams.
60478+
operationId: ListMemberTeams
60479+
parameters:
60480+
- description: None
60481+
in: path
60482+
name: super_team_id
60483+
required: true
60484+
schema:
60485+
type: string
60486+
- $ref: '#/components/parameters/PageSize'
60487+
- $ref: '#/components/parameters/PageNumber'
60488+
- description: List of fields that need to be fetched.
60489+
explode: false
60490+
in: query
60491+
name: fields[team]
60492+
required: false
60493+
schema:
60494+
items:
60495+
$ref: '#/components/schemas/TeamsField'
60496+
type: array
60497+
responses:
60498+
'200':
60499+
content:
60500+
application/json:
60501+
schema:
60502+
$ref: '#/components/schemas/TeamsResponse'
60503+
description: OK
60504+
'403':
60505+
$ref: '#/components/responses/ForbiddenResponse'
60506+
'404':
60507+
content:
60508+
application/json:
60509+
schema:
60510+
$ref: '#/components/schemas/APIErrorResponse'
60511+
description: API error response.
60512+
'429':
60513+
$ref: '#/components/responses/TooManyRequestsResponse'
60514+
security:
60515+
- apiKeyAuth: []
60516+
appKeyAuth: []
60517+
- AuthZ:
60518+
- teams_read
60519+
summary: Get all member teams
60520+
tags:
60521+
- Teams
60522+
x-pagination:
60523+
limitParam: page[size]
60524+
pageParam: page[number]
60525+
resultsPath: data
60526+
x-permission:
60527+
operator: OR
60528+
permissions:
60529+
- teams_read
60530+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
60531+
60532+
contact [Datadog support](https://docs.datadoghq.com/help/).'
60533+
post:
60534+
description: 'Add a member team.
60535+
60536+
Adds the team given by the `id` in the body as a member team of the super
60537+
team.'
60538+
operationId: AddMemberTeam
60539+
parameters:
60540+
- description: None
60541+
in: path
60542+
name: super_team_id
60543+
required: true
60544+
schema:
60545+
type: string
60546+
requestBody:
60547+
content:
60548+
application/json:
60549+
schema:
60550+
$ref: '#/components/schemas/AddMemberTeamRequest'
60551+
required: true
60552+
responses:
60553+
'204':
60554+
description: Added
60555+
'403':
60556+
$ref: '#/components/responses/ForbiddenResponse'
60557+
'409':
60558+
content:
60559+
application/json:
60560+
schema:
60561+
$ref: '#/components/schemas/APIErrorResponse'
60562+
description: API error response.
60563+
'429':
60564+
$ref: '#/components/responses/TooManyRequestsResponse'
60565+
security:
60566+
- apiKeyAuth: []
60567+
appKeyAuth: []
60568+
- AuthZ:
60569+
- teams_read
60570+
summary: Add a member team
60571+
tags:
60572+
- Teams
60573+
x-permission:
60574+
operator: OR
60575+
permissions:
60576+
- teams_read
60577+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
60578+
60579+
contact [Datadog support](https://docs.datadoghq.com/help/).'
60580+
/api/v2/team/{super_team_id}/member_teams/{member_team_id}:
60581+
delete:
60582+
description: Remove a super team's member team identified by `member_team_id`.
60583+
operationId: RemoveMemberTeam
60584+
parameters:
60585+
- description: None
60586+
in: path
60587+
name: super_team_id
60588+
required: true
60589+
schema:
60590+
type: string
60591+
- description: None
60592+
in: path
60593+
name: member_team_id
60594+
required: true
60595+
schema:
60596+
type: string
60597+
responses:
60598+
'204':
60599+
description: No Content
60600+
'403':
60601+
$ref: '#/components/responses/ForbiddenResponse'
60602+
'404':
60603+
content:
60604+
application/json:
60605+
schema:
60606+
$ref: '#/components/schemas/APIErrorResponse'
60607+
description: API error response.
60608+
'429':
60609+
$ref: '#/components/responses/TooManyRequestsResponse'
60610+
security:
60611+
- apiKeyAuth: []
60612+
appKeyAuth: []
60613+
- AuthZ:
60614+
- teams_read
60615+
summary: Remove a member team
60616+
tags:
60617+
- Teams
60618+
x-permission:
60619+
operator: OR
60620+
permissions:
60621+
- teams_read
60622+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
60623+
60624+
contact [Datadog support](https://docs.datadoghq.com/help/).'
6044560625
/api/v2/team/{team_id}:
6044660626
delete:
6044760627
description: Remove a team using the team's `id`.

examples/v2/teams/AddMemberTeam.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Add a member team returns "Added" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.TeamsApi;
6+
import com.datadog.api.client.v2.model.AddMemberTeamRequest;
7+
import com.datadog.api.client.v2.model.MemberTeam;
8+
import com.datadog.api.client.v2.model.MemberTeamType;
9+
10+
public class Example {
11+
public static void main(String[] args) {
12+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
13+
defaultClient.setUnstableOperationEnabled("v2.addMemberTeam", true);
14+
TeamsApi apiInstance = new TeamsApi(defaultClient);
15+
16+
AddMemberTeamRequest body =
17+
new AddMemberTeamRequest()
18+
.data(
19+
new MemberTeam()
20+
.id("aeadc05e-98a8-11ec-ac2c-da7ad0900001")
21+
.type(MemberTeamType.MEMBER_TEAMS));
22+
23+
try {
24+
apiInstance.addMemberTeam("super_team_id", body);
25+
} catch (ApiException e) {
26+
System.err.println("Exception when calling TeamsApi#addMemberTeam");
27+
System.err.println("Status code: " + e.getCode());
28+
System.err.println("Reason: " + e.getResponseBody());
29+
System.err.println("Response headers: " + e.getResponseHeaders());
30+
e.printStackTrace();
31+
}
32+
}
33+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Get all member teams returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.TeamsApi;
6+
import com.datadog.api.client.v2.model.TeamsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listMemberTeams", true);
12+
TeamsApi apiInstance = new TeamsApi(defaultClient);
13+
14+
try {
15+
TeamsResponse result = apiInstance.listMemberTeams("super_team_id");
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling TeamsApi#listMemberTeams");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Get all member teams returns "OK" response with pagination
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.PaginationIterable;
5+
import com.datadog.api.client.v2.api.TeamsApi;
6+
import com.datadog.api.client.v2.model.Team;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listMemberTeams", true);
12+
TeamsApi apiInstance = new TeamsApi(defaultClient);
13+
14+
try {
15+
PaginationIterable<Team> iterable =
16+
apiInstance.listMemberTeamsWithPagination("super_team_id");
17+
18+
for (Team item : iterable) {
19+
System.out.println(item);
20+
}
21+
} catch (RuntimeException e) {
22+
System.err.println("Exception when calling TeamsApi#listMemberTeamsWithPagination");
23+
System.err.println("Reason: " + e.getMessage());
24+
e.printStackTrace();
25+
}
26+
}
27+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Remove a member team returns "No Content" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.TeamsApi;
6+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.removeMemberTeam", true);
11+
TeamsApi apiInstance = new TeamsApi(defaultClient);
12+
13+
try {
14+
apiInstance.removeMemberTeam("super_team_id", "member_team_id");
15+
} catch (ApiException e) {
16+
System.err.println("Exception when calling TeamsApi#removeMemberTeam");
17+
System.err.println("Status code: " + e.getCode());
18+
System.err.println("Reason: " + e.getResponseBody());
19+
System.err.println("Response headers: " + e.getResponseHeaders());
20+
e.printStackTrace();
21+
}
22+
}
23+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ public class ApiClient {
689689
put("v2.createSLOReportJob", false);
690690
put("v2.getSLOReport", false);
691691
put("v2.getSLOReportJobStatus", false);
692+
put("v2.addMemberTeam", false);
693+
put("v2.listMemberTeams", false);
694+
put("v2.removeMemberTeam", false);
692695
put("v2.createIncidentTeam", false);
693696
put("v2.deleteIncidentTeam", false);
694697
put("v2.getIncidentTeam", false);

0 commit comments

Comments
 (0)