Skip to content

Commit 3e61bac

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 07f8772 of spec repo
1 parent 3007720 commit 3e61bac

File tree

120 files changed

+1225
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1225
-172
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "d02c8a3",
3-
"generated": "2025-08-08 12:08:35.449"
2+
"spec_repo_commit": "07f8772",
3+
"generated": "2025-08-11 21:21:04.291"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42273,6 +42273,68 @@ components:
4227342273
urgency:
4227442274
$ref: '#/components/schemas/Urgency'
4227542275
type: object
42276+
TeamSyncAttributes:
42277+
description: Team sync attributes.
42278+
properties:
42279+
source:
42280+
$ref: '#/components/schemas/TeamSyncAttributesSource'
42281+
type:
42282+
$ref: '#/components/schemas/TeamSyncAttributesType'
42283+
required:
42284+
- source
42285+
- type
42286+
type: object
42287+
TeamSyncAttributesSource:
42288+
description: The external source platform for team synchronization. Only "github"
42289+
is supported.
42290+
enum:
42291+
- github
42292+
example: github
42293+
type: string
42294+
x-enum-varnames:
42295+
- GITHUB
42296+
TeamSyncAttributesType:
42297+
description: The type of synchronization operation. Only "link" is supported,
42298+
which links existing teams by matching names.
42299+
enum:
42300+
- link
42301+
example: link
42302+
type: string
42303+
x-enum-varnames:
42304+
- LINK
42305+
TeamSyncBulkType:
42306+
description: Team sync bulk type.
42307+
enum:
42308+
- team_sync_bulk
42309+
example: team_sync_bulk
42310+
type: string
42311+
x-enum-varnames:
42312+
- TEAM_SYNC_BULK
42313+
TeamSyncData:
42314+
description: Team sync data.
42315+
properties:
42316+
attributes:
42317+
$ref: '#/components/schemas/TeamSyncAttributes'
42318+
type:
42319+
$ref: '#/components/schemas/TeamSyncBulkType'
42320+
required:
42321+
- attributes
42322+
- type
42323+
type: object
42324+
TeamSyncRequest:
42325+
description: Team sync request.
42326+
example:
42327+
data:
42328+
attributes:
42329+
source: github
42330+
type: link
42331+
type: team_sync_bulk
42332+
properties:
42333+
data:
42334+
$ref: '#/components/schemas/TeamSyncData'
42335+
required:
42336+
- data
42337+
type: object
4227642338
TeamTarget:
4227742339
description: Represents a team target for an escalation policy step, including
4227842340
the team's ID and resource type.
@@ -65313,6 +65375,71 @@ paths:
6531365375
permissions:
6531465376
- teams_read
6531565377
- teams_manage
65378+
/api/v2/team/sync:
65379+
post:
65380+
description: 'This endpoint attempts to link your existing Datadog teams with
65381+
GitHub teams by matching their names.
65382+
65383+
It evaluates all current Datadog teams and compares them against teams in
65384+
the GitHub organization
65385+
65386+
connected to your Datadog account, based on Datadog Team handle and GitHub
65387+
Team slug
65388+
65389+
(lowercased and kebab-cased).
65390+
65391+
65392+
This operation is read-only on the GitHub side, no teams will be modified
65393+
or created.
65394+
65395+
65396+
[A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
65397+
65398+
and the GitHub App integrated with Datadog must have the `Members Read` permission.
65399+
Matching is performed by comparing the Datadog team handle to the GitHub team
65400+
slug
65401+
65402+
using a normalized exact match; case is ignored and spaces are removed. No
65403+
modifications are made
65404+
65405+
to teams in GitHub. This will not create new Teams in Datadog.'
65406+
operationId: SyncTeams
65407+
requestBody:
65408+
content:
65409+
application/json:
65410+
schema:
65411+
$ref: '#/components/schemas/TeamSyncRequest'
65412+
required: true
65413+
responses:
65414+
'200':
65415+
description: OK
65416+
'403':
65417+
$ref: '#/components/responses/ForbiddenResponse'
65418+
'429':
65419+
$ref: '#/components/responses/TooManyRequestsResponse'
65420+
'500':
65421+
content:
65422+
application/json:
65423+
schema:
65424+
$ref: '#/components/schemas/APIErrorResponse'
65425+
description: Internal Server Error - Unexpected error during linking.
65426+
security:
65427+
- apiKeyAuth: []
65428+
appKeyAuth: []
65429+
- AuthZ:
65430+
- teams_manage
65431+
summary: Link Teams with GitHub Teams
65432+
tags:
65433+
- Teams
65434+
x-codegen-request-body-name: body
65435+
x-permission:
65436+
operator: AND
65437+
permissions:
65438+
- teams_manage
65439+
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
65440+
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
65441+
65442+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6531665443
/api/v2/team/{super_team_id}/member_teams:
6531765444
get:
6531865445
description: Get all member teams.

examples/v2/teams/SyncTeams.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Link Teams with GitHub 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.TeamSyncAttributes;
7+
import com.datadog.api.client.v2.model.TeamSyncAttributesSource;
8+
import com.datadog.api.client.v2.model.TeamSyncAttributesType;
9+
import com.datadog.api.client.v2.model.TeamSyncBulkType;
10+
import com.datadog.api.client.v2.model.TeamSyncData;
11+
import com.datadog.api.client.v2.model.TeamSyncRequest;
12+
13+
public class Example {
14+
public static void main(String[] args) {
15+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
16+
defaultClient.setUnstableOperationEnabled("v2.syncTeams", true);
17+
TeamsApi apiInstance = new TeamsApi(defaultClient);
18+
19+
TeamSyncRequest body =
20+
new TeamSyncRequest()
21+
.data(
22+
new TeamSyncData()
23+
.attributes(
24+
new TeamSyncAttributes()
25+
.source(TeamSyncAttributesSource.GITHUB)
26+
.type(TeamSyncAttributesType.LINK))
27+
.type(TeamSyncBulkType.TEAM_SYNC_BULK));
28+
29+
try {
30+
apiInstance.syncTeams(body);
31+
} catch (ApiException e) {
32+
System.err.println("Exception when calling TeamsApi#syncTeams");
33+
System.err.println("Status code: " + e.getCode());
34+
System.err.println("Reason: " + e.getResponseBody());
35+
System.err.println("Response headers: " + e.getResponseHeaders());
36+
e.printStackTrace();
37+
}
38+
}
39+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Sync 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.TeamSyncAttributes;
7+
import com.datadog.api.client.v2.model.TeamSyncAttributesSource;
8+
import com.datadog.api.client.v2.model.TeamSyncAttributesType;
9+
import com.datadog.api.client.v2.model.TeamSyncBulkType;
10+
import com.datadog.api.client.v2.model.TeamSyncData;
11+
import com.datadog.api.client.v2.model.TeamSyncRequest;
12+
13+
public class Example {
14+
public static void main(String[] args) {
15+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
16+
TeamsApi apiInstance = new TeamsApi(defaultClient);
17+
18+
TeamSyncRequest body =
19+
new TeamSyncRequest()
20+
.data(
21+
new TeamSyncData()
22+
.attributes(
23+
new TeamSyncAttributes()
24+
.source(TeamSyncAttributesSource.GITHUB)
25+
.type(TeamSyncAttributesType.LINK))
26+
.type(TeamSyncBulkType.TEAM_SYNC_BULK));
27+
28+
try {
29+
apiInstance.syncTeams(body);
30+
} catch (ApiException e) {
31+
System.err.println("Exception when calling TeamsApi#syncTeams");
32+
System.err.println("Status code: " + e.getCode());
33+
System.err.println("Reason: " + e.getResponseBody());
34+
System.err.println("Response headers: " + e.getResponseHeaders());
35+
e.printStackTrace();
36+
}
37+
}
38+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ public class ApiClient {
775775
put("v2.addMemberTeam", false);
776776
put("v2.listMemberTeams", false);
777777
put("v2.removeMemberTeam", false);
778+
put("v2.syncTeams", false);
778779
put("v2.createIncidentTeam", false);
779780
put("v2.deleteIncidentTeam", false);
780781
put("v2.getIncidentTeam", false);

0 commit comments

Comments
 (0)