Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 33 additions & 17 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22039,7 +22039,10 @@ components:
description: Reference to connected external team.
properties:
id:
description: The connected team ID as it is referenced throughout the Datadog ecosystem.
description: |-
The connected team ID as it is referenced throughout the Datadog ecosystem.
For GitHub teams, this is `@<organization>/<team-slug>`.
For ServiceNow groups, this is `<instance_name>/<sys_id>`.
example: "@GitHubOrg/team-handle"
type: string
type:
Expand All @@ -22053,10 +22056,12 @@ components:
description: External team resource type.
enum:
- github_team
- servicenow_team
example: "github_team"
type: string
x-enum-varnames:
- GITHUB_TEAM
- SERVICENOW_TEAM
Connection:
description: The definition of `Connection` object.
properties:
Expand Down Expand Up @@ -131034,7 +131039,7 @@ components:
example: "github_sync"
type: string
source:
description: The name of the external source.
description: The name of the external source, such as `github` or `servicenow`.
example: "github"
type: string
type: object
Expand Down Expand Up @@ -132193,13 +132198,15 @@ components:
$ref: "#/components/schemas/TeamSyncSelectionStateItem"
type: array
TeamSyncAttributesSource:
description: The external source platform for team synchronization. Only "github" is supported.
description: The external source platform for team synchronization.
enum:
- github
- servicenow
example: github
type: string
x-enum-varnames:
- GITHUB
- SERVICENOW
TeamSyncAttributesSyncMembership:
default: false
description: Whether to sync members from the external team to the Datadog team. Defaults to `false` when not provided.
Expand Down Expand Up @@ -132275,8 +132282,10 @@ components:
TeamSyncSelectionStateExternalIdType:
description: |-
The type of external identifier for the selection state item.
For GitHub synchronization, the allowed values are `team` and
`organization`.
For GitHub synchronization, `team` refers to a GitHub team and
`organization` refers to a GitHub organization. For ServiceNow
synchronization, `team` refers to a ServiceNow group and
`organization` refers to a ServiceNow instance.
enum:
- team
- organization
Expand All @@ -132290,7 +132299,9 @@ components:
The external identifier value from the source
platform. For GitHub, this is the string
representation of a GitHub organization ID or team
ID.
ID. For ServiceNow, this is the instance name for
`organization`, or `<instance_name>/<sys_id>` of the
group for `team`.
example: "1"
type: string
TeamSyncSelectionStateItem:
Expand Down Expand Up @@ -245230,7 +245241,7 @@ paths:
parameters:
- $ref: "#/components/parameters/PageSize"
- $ref: "#/components/parameters/PageNumber"
- description: Filter team connections by external source systems.
- description: Filter team connections by external source systems, such as `github` or `servicenow`.
explode: false
in: query
name: filter[sources]
Expand Down Expand Up @@ -245378,7 +245389,7 @@ paths:
get:
description: |-
Get all team synchronization configurations.
Returns a list of configurations used for linking or provisioning teams with external sources like GitHub.
Returns a list of configurations used for linking or provisioning teams with external sources like GitHub or ServiceNow.
operationId: GetTeamSync
parameters:
- description: Filter by the external source platform for team synchronization
Expand Down Expand Up @@ -245422,21 +245433,26 @@ paths:
- teams_read
post:
description: |-
This endpoint configures synchronization between your existing Datadog teams and GitHub teams by matching their names.
It evaluates all current Datadog teams and compares them against teams in the GitHub organization
connected to your Datadog account, based on Datadog Team handle and GitHub Team slug
(lowercased and kebab-cased).
This endpoint configures synchronization between your existing Datadog teams and teams from
GitHub or ServiceNow by matching team names.
It evaluates all current Datadog teams and compares them against teams in the external source
connected to your Datadog account.

This operation is read-only on the GitHub side, no teams will be modified or created.
This operation is read-only on the external source side, no teams will be modified or created there.
This only creates new teams in Datadog when type is set to `provision`.

Optionally, provide `selection_state` to limit synchronization
to specific teams or organizations and their subtrees, instead
of syncing all teams.

[A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
**GitHub**: [A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
and the GitHub App integrated with Datadog must have the `Members Read` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug
using a normalized exact match; case is ignored and spaces are removed. No modifications are made
to teams in GitHub. This only creates new teams in Datadog when type is set to `provision`.
(lowercased and kebab-cased) using a normalized exact match; case is ignored and spaces are removed.

**ServiceNow**: [The ServiceNow integration must be configured for your Datadog account](https://docs.datadoghq.com/integrations/servicenow/).
Active assignment groups from every configured ServiceNow instance are synchronized, and the ServiceNow
group hierarchy is preserved. When `sync_membership` is enabled, group members are matched to Datadog
users by email address.
operationId: SyncTeams
requestBody:
content:
Expand Down Expand Up @@ -245472,7 +245488,7 @@ paths:
appKeyAuth: []
- AuthZ:
- teams_manage
summary: Link Teams with GitHub Teams
summary: Link teams with external teams
tags:
- Teams
x-codegen-request-body-name: body
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/teams/SyncTeams.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Link Teams with GitHub Teams returns "OK" response
// Link teams with external teams returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
Expand Down
40 changes: 24 additions & 16 deletions src/main/java/com/datadog/api/client/v2/api/TeamsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -3202,7 +3202,7 @@ public CompletableFuture<TeamSyncResponse> getTeamSyncAsync(

/**
* Get all team synchronization configurations. Returns a list of configurations used for linking
* or provisioning teams with external sources like GitHub.
* or provisioning teams with external sources like GitHub or ServiceNow.
*
* @param filterSource Filter by the external source platform for team synchronization (required)
* @return ApiResponse&lt;TeamSyncResponse&gt;
Expand Down Expand Up @@ -3803,7 +3803,8 @@ public ListTeamConnectionsOptionalParameters pageNumber(Long pageNumber) {
/**
* Set filterSources.
*
* @param filterSources Filter team connections by external source systems. (optional)
* @param filterSources Filter team connections by external source systems, such as <code>github
* </code> or <code>servicenow</code>. (optional)
* @return ListTeamConnectionsOptionalParameters
*/
public ListTeamConnectionsOptionalParameters filterSources(List<String> filterSources) {
Expand Down Expand Up @@ -5000,7 +5001,7 @@ public CompletableFuture<ApiResponse<Void>> removeTeamHierarchyLinkWithHttpInfoA
}

/**
* Link Teams with GitHub Teams.
* Link teams with external teams.
*
* <p>See {@link #syncTeamsWithHttpInfo}.
*
Expand All @@ -5012,7 +5013,7 @@ public void syncTeams(TeamSyncRequest body) throws ApiException {
}

/**
* Link Teams with GitHub Teams.
* Link teams with external teams.
*
* <p>See {@link #syncTeamsWithHttpInfoAsync}.
*
Expand All @@ -5028,22 +5029,29 @@ public CompletableFuture<Void> syncTeamsAsync(TeamSyncRequest body) {
}

/**
* This endpoint configures synchronization between your existing Datadog teams and GitHub teams
* by matching their names. It evaluates all current Datadog teams and compares them against teams
* in the GitHub organization connected to your Datadog account, based on Datadog Team handle and
* GitHub Team slug (lowercased and kebab-cased).
* This endpoint configures synchronization between your existing Datadog teams and teams from
* GitHub or ServiceNow by matching team names. It evaluates all current Datadog teams and
* compares them against teams in the external source connected to your Datadog account.
*
* <p>This operation is read-only on the GitHub side, no teams will be modified or created.
* <p>This operation is read-only on the external source side, no teams will be modified or
* created there. This only creates new teams in Datadog when type is set to <code>provision
* </code>.
*
* <p>Optionally, provide <code>selection_state</code> to limit synchronization to specific teams
* or organizations and their subtrees, instead of syncing all teams.
*
* <p><a href="https://docs.datadoghq.com/integrations/github/">A GitHub organization must be
* connected to your Datadog account</a>, and the GitHub App integrated with Datadog must have the
* <code>Members Read</code> permission. Matching is performed by comparing the Datadog team
* handle to the GitHub team slug using a normalized exact match; case is ignored and spaces are
* removed. No modifications are made to teams in GitHub. This only creates new teams in Datadog
* when type is set to <code>provision</code>.
* <p><strong>GitHub</strong>: <a href="https://docs.datadoghq.com/integrations/github/">A GitHub
* organization must be connected to your Datadog account</a>, and the GitHub App integrated with
* Datadog must have the <code>Members Read</code> permission. Matching is performed by comparing
* the Datadog team handle to the GitHub team slug (lowercased and kebab-cased) using a normalized
* exact match; case is ignored and spaces are removed.
*
* <p><strong>ServiceNow</strong>: <a
* href="https://docs.datadoghq.com/integrations/servicenow/">The ServiceNow integration must be
* configured for your Datadog account</a>. Active assignment groups from every configured
* ServiceNow instance are synchronized, and the ServiceNow group hierarchy is preserved. When
* <code>sync_membership</code> is enabled, group members are matched to Datadog users by email
* address.
*
* @param body (required)
* @return ApiResponse&lt;Void&gt;
Expand Down Expand Up @@ -5092,7 +5100,7 @@ public ApiResponse<Void> syncTeamsWithHttpInfo(TeamSyncRequest body) throws ApiE
}

/**
* Link Teams with GitHub Teams.
* Link teams with external teams.
*
* <p>See {@link #syncTeamsWithHttpInfo}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public ConnectedTeamRefData id(String id) {
}

/**
* The connected team ID as it is referenced throughout the Datadog ecosystem.
* The connected team ID as it is referenced throughout the Datadog ecosystem. For GitHub teams,
* this is <code>@&lt;organization&gt;/&lt;team-slug&gt;</code>. For ServiceNow groups, this is
* <code>&lt;instance_name&gt;/&lt;sys_id&gt;</code>.
*
* @return id
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
public class ConnectedTeamRefDataType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("github_team"));
new HashSet<String>(Arrays.asList("github_team", "servicenow_team"));

public static final ConnectedTeamRefDataType GITHUB_TEAM =
new ConnectedTeamRefDataType("github_team");
public static final ConnectedTeamRefDataType SERVICENOW_TEAM =
new ConnectedTeamRefDataType("servicenow_team");

ConnectedTeamRefDataType(String value) {
super(value, allowedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public TeamConnectionAttributes source(String source) {
}

/**
* The name of the external source.
* The name of the external source, such as <code>github</code> or <code>servicenow</code>.
*
* @return source
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public TeamSyncAttributes source(TeamSyncAttributesSource source) {
}

/**
* The external source platform for team synchronization. Only "github" is supported.
* The external source platform for team synchronization.
*
* @return source
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
import java.util.HashSet;
import java.util.Set;

/** The external source platform for team synchronization. Only "github" is supported. */
/** The external source platform for team synchronization. */
@JsonSerialize(using = TeamSyncAttributesSource.TeamSyncAttributesSourceSerializer.class)
public class TeamSyncAttributesSource extends ModelEnum<String> {

private static final Set<String> allowedValues = new HashSet<String>(Arrays.asList("github"));
private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("github", "servicenow"));

public static final TeamSyncAttributesSource GITHUB = new TeamSyncAttributesSource("github");
public static final TeamSyncAttributesSource SERVICENOW =
new TeamSyncAttributesSource("servicenow");

TeamSyncAttributesSource(String value) {
super(value, allowedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public TeamSyncSelectionStateExternalId type(TeamSyncSelectionStateExternalIdTyp
}

/**
* The type of external identifier for the selection state item. For GitHub synchronization, the
* allowed values are <code>team</code> and <code>organization</code>.
* The type of external identifier for the selection state item. For GitHub synchronization,
* <code>team</code> refers to a GitHub team and <code>organization</code> refers to a GitHub
* organization. For ServiceNow synchronization, <code>team</code> refers to a ServiceNow group
* and <code>organization</code> refers to a ServiceNow instance.
*
* @return type
*/
Expand All @@ -76,7 +78,9 @@ public TeamSyncSelectionStateExternalId value(String value) {

/**
* The external identifier value from the source platform. For GitHub, this is the string
* representation of a GitHub organization ID or team ID.
* representation of a GitHub organization ID or team ID. For ServiceNow, this is the instance
* name for <code>organization</code>, or <code>&lt;instance_name&gt;/&lt;sys_id&gt;</code> of the
* group for <code>team</code>.
*
* @return value
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
import java.util.Set;

/**
* The type of external identifier for the selection state item. For GitHub synchronization, the
* allowed values are <code>team</code> and <code>organization</code>.
* The type of external identifier for the selection state item. For GitHub synchronization, <code>
* team</code> refers to a GitHub team and <code>organization</code> refers to a GitHub
* organization. For ServiceNow synchronization, <code>team</code> refers to a ServiceNow group and
* <code>organization</code> refers to a ServiceNow instance.
*/
@JsonSerialize(
using =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,14 @@ Feature: Teams
And the response "data" has length 0

@team:ddoghq/aaa-omg
Scenario: Link Teams with GitHub Teams returns "No Content" response
Scenario: Link teams with external teams returns "No Content" response
Given new "SyncTeams" request
And body with value {"data": {"attributes": {"source": "github", "type": "link", "selection_state": [{"external_id": {"type": "organization", "value": "1"}}]}, "type": "team_sync_bulk"}}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:ddoghq/aaa-omg
Scenario: Link Teams with GitHub Teams returns "OK" response
Scenario: Link teams with external teams returns "OK" response
Given new "SyncTeams" request
And body with value {"data": {"attributes": {"source": "github", "type": "link"}, "type": "team_sync_bulk"}}
When the request is sent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12197,8 +12197,8 @@
{
"feature": "Teams",
"feature_file": "../../com/datadog/api/client/v2/api/teams.feature",
"file": "v2/teams/link-teams-with-github-teams-returns-no-content-response.json",
"scenario": "Link Teams with GitHub Teams returns \"No Content\" response",
"file": "v2/teams/link-teams-with-external-teams-returns-no-content-response.json",
"scenario": "Link teams with external teams returns \"No Content\" response",
"version": "v2"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"api": "Teams",
"expected_status": 204,
"feature": "Teams",
"id": "v2/Teams/Link Teams with GitHub Teams returns \"No Content\" response",
"id": "v2/Teams/Link teams with external teams returns \"No Content\" response",
"operation_id": "SyncTeams",
"request": {
"body": {
Expand Down Expand Up @@ -36,7 +36,7 @@
"parameters": [],
"path": "/api/v2/team/sync"
},
"scenario": "Link Teams with GitHub Teams returns \"No Content\" response",
"scenario": "Link teams with external teams returns \"No Content\" response",
"schema_version": 1,
"version": "v2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4394,7 +4394,7 @@
},
{
"feature": "Teams",
"frozen_at": "2026-03-04T16:01:34.366Z",
"frozen_at": "2026-10-19T16:23:49.447Z",
"interactions": [
{
"request": {
Expand Down Expand Up @@ -4434,7 +4434,7 @@
}
}
],
"scenario": "Link Teams with GitHub Teams returns \"No Content\" response",
"scenario": "Link teams with external teams returns \"No Content\" response",
"version": "v2"
},
{
Expand Down
Loading