From 163f17e36d6b2022fdb1c17b9b666098563c0763 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 21 Oct 2026 13:16:41 +0000 Subject: [PATCH] Regenerate client from commit 9349c50 of spec repo --- .generator/schemas/v2/openapi.yaml | 50 ++++++++++++------- examples/v2/teams/SyncTeams.py | 2 +- src/datadog_api_client/v2/api/teams_api.py | 29 ++++++----- .../v2/model/connected_team_ref_data.py | 2 + .../v2/model/connected_team_ref_data_type.py | 5 +- .../v2/model/team_connection_attributes.py | 2 +- .../v2/model/team_sync_attributes.py | 2 +- .../v2/model/team_sync_attributes_source.py | 7 ++- .../team_sync_selection_state_external_id.py | 10 ++-- ...m_sync_selection_state_external_id_type.py | 6 ++- .../test-runner-data/manifest.json | 4 +- ...al-teams-returns-no-content-response.json} | 4 +- .../test-server-data/v2/teams.json | 4 +- tests/v2/features/teams.feature | 4 +- 14 files changed, 83 insertions(+), 48 deletions(-) rename tests/generated-test/test-runner-data/v2/teams/{link-teams-with-github-teams-returns-no-content-response.json => link-teams-with-external-teams-returns-no-content-response.json} (83%) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 29872b8b53..a8e6e7004b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22124,7 +22124,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: @@ -22138,10 +22141,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: @@ -131149,7 +131154,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 @@ -132308,13 +132313,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. @@ -132390,8 +132397,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 @@ -132405,7 +132414,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: @@ -245398,7 +245409,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] @@ -245546,7 +245557,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 @@ -245590,21 +245601,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: @@ -245640,7 +245656,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.py b/examples/v2/teams/SyncTeams.py index eade4d19f7..02f9251126 100644 --- a/examples/v2/teams/SyncTeams.py +++ b/examples/v2/teams/SyncTeams.py @@ -1,5 +1,5 @@ """ -Link Teams with GitHub Teams returns "OK" response +Link teams with external teams returns "OK" response """ from os import environ diff --git a/src/datadog_api_client/v2/api/teams_api.py b/src/datadog_api_client/v2/api/teams_api.py index 94e3fc16e3..b02cbf4e4c 100644 --- a/src/datadog_api_client/v2/api/teams_api.py +++ b/src/datadog_api_client/v2/api/teams_api.py @@ -1490,7 +1490,7 @@ def get_team_sync( """Get team sync configurations. 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. :param filter_source: Filter by the external source platform for team synchronization :type filter_source: TeamSyncAttributesSource @@ -1625,7 +1625,7 @@ def list_team_connections( :type page_size: int, optional :param page_number: Specific page number to return. :type page_number: int, optional - :param filter_sources: Filter team connections by external source systems. + :param filter_sources: Filter team connections by external source systems, such as ``github`` or ``servicenow``. :type filter_sources: [str], optional :param filter_team_ids: Filter team connections by Datadog team IDs. :type filter_team_ids: [str], optional @@ -1674,7 +1674,7 @@ def list_team_connections_with_pagination( :type page_size: int, optional :param page_number: Specific page number to return. :type page_number: int, optional - :param filter_sources: Filter team connections by external source systems. + :param filter_sources: Filter team connections by external source systems, such as ``github`` or ``servicenow``. :type filter_sources: [str], optional :param filter_team_ids: Filter team connections by Datadog team IDs. :type filter_team_ids: [str], optional @@ -1975,23 +1975,28 @@ def sync_teams( self, body: TeamSyncRequest, ) -> None: - """Link Teams with GitHub Teams. + """Link teams with external teams. - 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 `_ , + **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 - 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 `_. + 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. :type body: TeamSyncRequest :rtype: None diff --git a/src/datadog_api_client/v2/model/connected_team_ref_data.py b/src/datadog_api_client/v2/model/connected_team_ref_data.py index 40de88b8e4..9f3bb60f3f 100644 --- a/src/datadog_api_client/v2/model/connected_team_ref_data.py +++ b/src/datadog_api_client/v2/model/connected_team_ref_data.py @@ -35,6 +35,8 @@ def __init__(self_, id: str, type: ConnectedTeamRefDataType, **kwargs): Reference to connected external team. :param id: The connected team ID as it is referenced throughout the Datadog ecosystem. + For GitHub teams, this is ``@/``. + For ServiceNow groups, this is ``/``. :type id: str :param type: External team resource type. diff --git a/src/datadog_api_client/v2/model/connected_team_ref_data_type.py b/src/datadog_api_client/v2/model/connected_team_ref_data_type.py index 4c2e5a212c..f3ede1d1e4 100644 --- a/src/datadog_api_client/v2/model/connected_team_ref_data_type.py +++ b/src/datadog_api_client/v2/model/connected_team_ref_data_type.py @@ -16,14 +16,16 @@ class ConnectedTeamRefDataType(ModelSimple): """ External team resource type. - :param value: If omitted defaults to "github_team". Must be one of ["github_team"]. + :param value: If omitted defaults to "github_team". Must be one of ["github_team", "servicenow_team"]. :type value: str """ allowed_values = { "github_team", + "servicenow_team", } GITHUB_TEAM: ClassVar["ConnectedTeamRefDataType"] + SERVICENOW_TEAM: ClassVar["ConnectedTeamRefDataType"] @cached_property def openapi_types(_): @@ -33,3 +35,4 @@ def openapi_types(_): ConnectedTeamRefDataType.GITHUB_TEAM = ConnectedTeamRefDataType("github_team") +ConnectedTeamRefDataType.SERVICENOW_TEAM = ConnectedTeamRefDataType("servicenow_team") diff --git a/src/datadog_api_client/v2/model/team_connection_attributes.py b/src/datadog_api_client/v2/model/team_connection_attributes.py index ddd81ed446..16f79e890a 100644 --- a/src/datadog_api_client/v2/model/team_connection_attributes.py +++ b/src/datadog_api_client/v2/model/team_connection_attributes.py @@ -33,7 +33,7 @@ def __init__(self_, managed_by: Union[str, UnsetType] = unset, source: Union[str :param managed_by: The entity that manages this team connection. :type managed_by: str, optional - :param source: The name of the external source. + :param source: The name of the external source, such as ``github`` or ``servicenow``. :type source: str, optional """ if managed_by is not unset: diff --git a/src/datadog_api_client/v2/model/team_sync_attributes.py b/src/datadog_api_client/v2/model/team_sync_attributes.py index 431ae8de98..5d4f003095 100644 --- a/src/datadog_api_client/v2/model/team_sync_attributes.py +++ b/src/datadog_api_client/v2/model/team_sync_attributes.py @@ -64,7 +64,7 @@ def __init__( items and their subtrees. :type selection_state: [TeamSyncSelectionStateItem], optional - :param source: The external source platform for team synchronization. Only "github" is supported. + :param source: The external source platform for team synchronization. :type source: TeamSyncAttributesSource :param sync_membership: Whether to sync members from the external team to the Datadog team. Defaults to ``false`` when not provided. diff --git a/src/datadog_api_client/v2/model/team_sync_attributes_source.py b/src/datadog_api_client/v2/model/team_sync_attributes_source.py index 6a3cdc6d6e..fac4e42a3b 100644 --- a/src/datadog_api_client/v2/model/team_sync_attributes_source.py +++ b/src/datadog_api_client/v2/model/team_sync_attributes_source.py @@ -14,16 +14,18 @@ class TeamSyncAttributesSource(ModelSimple): """ - The external source platform for team synchronization. Only "github" is supported. + The external source platform for team synchronization. - :param value: If omitted defaults to "github". Must be one of ["github"]. + :param value: Must be one of ["github", "servicenow"]. :type value: str """ allowed_values = { "github", + "servicenow", } GITHUB: ClassVar["TeamSyncAttributesSource"] + SERVICENOW: ClassVar["TeamSyncAttributesSource"] @cached_property def openapi_types(_): @@ -33,3 +35,4 @@ def openapi_types(_): TeamSyncAttributesSource.GITHUB = TeamSyncAttributesSource("github") +TeamSyncAttributesSource.SERVICENOW = TeamSyncAttributesSource("servicenow") diff --git a/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py index b36dd1e491..46340be0de 100644 --- a/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id.py @@ -39,14 +39,18 @@ def __init__(self_, type: TeamSyncSelectionStateExternalIdType, value: str, **kw The external identifier for a team or organization in the source platform. :param type: 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. :type type: TeamSyncSelectionStateExternalIdType :param value: 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``. :type value: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py index 68d4e2c90e..933b7b36a4 100644 --- a/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py +++ b/src/datadog_api_client/v2/model/team_sync_selection_state_external_id_type.py @@ -15,8 +15,10 @@ class TeamSyncSelectionStateExternalIdType(ModelSimple): """ 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. :param value: Must be one of ["team", "organization"]. :type value: str diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index c2d1383b82..399fd8997a 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -12344,8 +12344,8 @@ { "feature": "Teams", "feature_file": "../../v2/features/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/tests/generated-test/test-runner-data/v2/teams/link-teams-with-github-teams-returns-no-content-response.json b/tests/generated-test/test-runner-data/v2/teams/link-teams-with-external-teams-returns-no-content-response.json similarity index 83% rename from tests/generated-test/test-runner-data/v2/teams/link-teams-with-github-teams-returns-no-content-response.json rename to tests/generated-test/test-runner-data/v2/teams/link-teams-with-external-teams-returns-no-content-response.json index 64602cb4e0..af1bea826f 100644 --- a/tests/generated-test/test-runner-data/v2/teams/link-teams-with-github-teams-returns-no-content-response.json +++ b/tests/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/tests/generated-test/test-server-data/v2/teams.json b/tests/generated-test/test-server-data/v2/teams.json index 9951611990..155df675f1 100644 --- a/tests/generated-test/test-server-data/v2/teams.json +++ b/tests/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" }, { diff --git a/tests/v2/features/teams.feature b/tests/v2/features/teams.feature index 4133b1f46e..7c87d5933f 100644 --- a/tests/v2/features/teams.feature +++ b/tests/v2/features/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