Skip to content

Commit fc1d6e0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 710ac2d of spec repo
1 parent 330a09e commit fc1d6e0

File tree

16 files changed

+1132
-47
lines changed

16 files changed

+1132
-47
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": "8001cbb",
3-
"generated": "2025-08-13 20:28:47.526"
2+
"spec_repo_commit": "710ac2d",
3+
"generated": "2025-08-15 18:21:53.286"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42830,6 +42830,68 @@ components:
4283042830
urgency:
4283142831
$ref: '#/components/schemas/Urgency'
4283242832
type: object
42833+
TeamSyncAttributes:
42834+
description: Team sync attributes.
42835+
properties:
42836+
source:
42837+
$ref: '#/components/schemas/TeamSyncAttributesSource'
42838+
type:
42839+
$ref: '#/components/schemas/TeamSyncAttributesType'
42840+
required:
42841+
- source
42842+
- type
42843+
type: object
42844+
TeamSyncAttributesSource:
42845+
description: The external source platform for team synchronization. Only "github"
42846+
is supported.
42847+
enum:
42848+
- github
42849+
example: github
42850+
type: string
42851+
x-enum-varnames:
42852+
- GITHUB
42853+
TeamSyncAttributesType:
42854+
description: The type of synchronization operation. Only "link" is supported,
42855+
which links existing teams by matching names.
42856+
enum:
42857+
- link
42858+
example: link
42859+
type: string
42860+
x-enum-varnames:
42861+
- LINK
42862+
TeamSyncBulkType:
42863+
description: Team sync bulk type.
42864+
enum:
42865+
- team_sync_bulk
42866+
example: team_sync_bulk
42867+
type: string
42868+
x-enum-varnames:
42869+
- TEAM_SYNC_BULK
42870+
TeamSyncData:
42871+
description: Team sync data.
42872+
properties:
42873+
attributes:
42874+
$ref: '#/components/schemas/TeamSyncAttributes'
42875+
type:
42876+
$ref: '#/components/schemas/TeamSyncBulkType'
42877+
required:
42878+
- attributes
42879+
- type
42880+
type: object
42881+
TeamSyncRequest:
42882+
description: Team sync request.
42883+
example:
42884+
data:
42885+
attributes:
42886+
source: github
42887+
type: link
42888+
type: team_sync_bulk
42889+
properties:
42890+
data:
42891+
$ref: '#/components/schemas/TeamSyncData'
42892+
required:
42893+
- data
42894+
type: object
4283342895
TeamTarget:
4283442896
description: Represents a team target for an escalation policy step, including
4283542897
the team's ID and resource type.
@@ -65870,6 +65932,71 @@ paths:
6587065932
permissions:
6587165933
- teams_read
6587265934
- teams_manage
65935+
/api/v2/team/sync:
65936+
post:
65937+
description: 'This endpoint attempts to link your existing Datadog teams with
65938+
GitHub teams by matching their names.
65939+
65940+
It evaluates all current Datadog teams and compares them against teams in
65941+
the GitHub organization
65942+
65943+
connected to your Datadog account, based on Datadog Team handle and GitHub
65944+
Team slug
65945+
65946+
(lowercased and kebab-cased).
65947+
65948+
65949+
This operation is read-only on the GitHub side, no teams will be modified
65950+
or created.
65951+
65952+
65953+
[A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
65954+
65955+
and the GitHub App integrated with Datadog must have the `Members Read` permission.
65956+
Matching is performed by comparing the Datadog team handle to the GitHub team
65957+
slug
65958+
65959+
using a normalized exact match; case is ignored and spaces are removed. No
65960+
modifications are made
65961+
65962+
to teams in GitHub. This will not create new Teams in Datadog.'
65963+
operationId: SyncTeams
65964+
requestBody:
65965+
content:
65966+
application/json:
65967+
schema:
65968+
$ref: '#/components/schemas/TeamSyncRequest'
65969+
required: true
65970+
responses:
65971+
'200':
65972+
description: OK
65973+
'403':
65974+
$ref: '#/components/responses/ForbiddenResponse'
65975+
'429':
65976+
$ref: '#/components/responses/TooManyRequestsResponse'
65977+
'500':
65978+
content:
65979+
application/json:
65980+
schema:
65981+
$ref: '#/components/schemas/APIErrorResponse'
65982+
description: Internal Server Error - Unexpected error during linking.
65983+
security:
65984+
- apiKeyAuth: []
65985+
appKeyAuth: []
65986+
- AuthZ:
65987+
- teams_manage
65988+
summary: Link Teams with GitHub Teams
65989+
tags:
65990+
- Teams
65991+
x-codegen-request-body-name: body
65992+
x-permission:
65993+
operator: AND
65994+
permissions:
65995+
- teams_manage
65996+
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
65997+
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).
65998+
65999+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6587366000
/api/v2/team/{super_team_id}/member_teams:
6587466001
get:
6587566002
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)