diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 04454bdda2d..3c59997a94c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 `@/`. + For ServiceNow groups, this is `/`. example: "@GitHubOrg/team-handle" type: string type: @@ -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: @@ -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 @@ -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. @@ -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 @@ -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 `/` of the + group for `team`. example: "1" type: string TeamSyncSelectionStateItem: @@ -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] @@ -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 @@ -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: @@ -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 diff --git a/examples/v2/teams/SyncTeams.java b/examples/v2/teams/SyncTeams.java index cf8c49482bf..4fed4bb907a 100644 --- a/examples/v2/teams/SyncTeams.java +++ b/examples/v2/teams/SyncTeams.java @@ -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; diff --git a/src/main/java/com/datadog/api/client/v2/api/TeamsApi.java b/src/main/java/com/datadog/api/client/v2/api/TeamsApi.java index 97a81ffde98..6aab318f6f2 100644 --- a/src/main/java/com/datadog/api/client/v2/api/TeamsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/TeamsApi.java @@ -3202,7 +3202,7 @@ public CompletableFuture 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<TeamSyncResponse> @@ -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 github + * or servicenow. (optional) * @return ListTeamConnectionsOptionalParameters */ public ListTeamConnectionsOptionalParameters filterSources(List filterSources) { @@ -5000,7 +5001,7 @@ public CompletableFuture> removeTeamHierarchyLinkWithHttpInfoA } /** - * Link Teams with GitHub Teams. + * Link teams with external teams. * *

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

See {@link #syncTeamsWithHttpInfoAsync}. * @@ -5028,22 +5029,29 @@ public CompletableFuture 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. * - *

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, 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. + *

GitHub: A GitHub + * organization must be connected to your Datadog account, 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 (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. 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. * * @param body (required) * @return ApiResponse<Void> @@ -5092,7 +5100,7 @@ public ApiResponse syncTeamsWithHttpInfo(TeamSyncRequest body) throws ApiE } /** - * Link Teams with GitHub Teams. + * Link teams with external teams. * *

See {@link #syncTeamsWithHttpInfo}. * diff --git a/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefData.java b/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefData.java index 7f092e93e91..ec8030b4cd9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefData.java @@ -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 @<organization>/<team-slug>. For ServiceNow groups, this is + * <instance_name>/<sys_id>. * * @return id */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefDataType.java b/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefDataType.java index 8094bbcd045..faa72f3a23b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConnectedTeamRefDataType.java @@ -23,10 +23,12 @@ public class ConnectedTeamRefDataType extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("github_team")); + new HashSet(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); diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamConnectionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TeamConnectionAttributes.java index 461f883e563..22ca961beac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamConnectionAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamConnectionAttributes.java @@ -58,7 +58,7 @@ public TeamConnectionAttributes source(String source) { } /** - * The name of the external source. + * The name of the external source, such as github or servicenow. * * @return source */ diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributes.java index ae0e2086521..00daf6f78a3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributes.java @@ -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 */ diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributesSource.java b/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributesSource.java index 6b1310e5a93..aa800d4e8be 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributesSource.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributesSource.java @@ -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 { - private static final Set allowedValues = new HashSet(Arrays.asList("github")); + private static final Set allowedValues = + new HashSet(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); diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalId.java b/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalId.java index e47a6e073c4..e9f9bac9c40 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalId.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalId.java @@ -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 team and organization. + * The type of external identifier for the selection state item. 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. * * @return type */ @@ -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 organization, or <instance_name>/<sys_id> of the + * group for team. * * @return value */ diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalIdType.java b/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalIdType.java index 6dc60f50ec9..39002363c81 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalIdType.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamSyncSelectionStateExternalIdType.java @@ -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 team and organization. + * The type of external identifier for the selection state item. 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. */ @JsonSerialize( using = diff --git a/src/test/resources/com/datadog/api/client/v2/api/teams.feature b/src/test/resources/com/datadog/api/client/v2/api/teams.feature index 4133b1f46eb..7c87d5933ff 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/teams.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/teams.feature @@ -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 diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index 976b3017394..d87199281c2 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -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" }, { diff --git a/src/test/resources/generated-test/test-runner-data/v2/teams/link-teams-with-github-teams-returns-no-content-response.json b/src/test/resources/generated-test/test-runner-data/v2/teams/link-teams-with-external-teams-returns-no-content-response.json similarity index 83% rename from src/test/resources/generated-test/test-runner-data/v2/teams/link-teams-with-github-teams-returns-no-content-response.json rename to src/test/resources/generated-test/test-runner-data/v2/teams/link-teams-with-external-teams-returns-no-content-response.json index 64602cb4e0c..af1bea826f1 100644 --- a/src/test/resources/generated-test/test-runner-data/v2/teams/link-teams-with-github-teams-returns-no-content-response.json +++ b/src/test/resources/generated-test/test-runner-data/v2/teams/link-teams-with-external-teams-returns-no-content-response.json @@ -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": { @@ -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" } diff --git a/src/test/resources/generated-test/test-server-data/v2/teams.json b/src/test/resources/generated-test/test-server-data/v2/teams.json index 9951611990f..155df675f1a 100644 --- a/src/test/resources/generated-test/test-server-data/v2/teams.json +++ b/src/test/resources/generated-test/test-server-data/v2/teams.json @@ -4394,7 +4394,7 @@ }, { "feature": "Teams", - "frozen_at": "2026-03-04T16:01:34.366Z", + "frozen_at": "2026-10-19T16:23:49.447Z", "interactions": [ { "request": { @@ -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" }, {