Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "b434599",
"generated": "2025-08-13 22:15:38.201"
"spec_repo_commit": "c38287b",
"generated": "2025-08-15 18:53:36.766"
}
127 changes: 127 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42824,6 +42824,68 @@ components:
urgency:
$ref: '#/components/schemas/Urgency'
type: object
TeamSyncAttributes:
description: Team sync attributes.
properties:
source:
$ref: '#/components/schemas/TeamSyncAttributesSource'
type:
$ref: '#/components/schemas/TeamSyncAttributesType'
required:
- source
- type
type: object
TeamSyncAttributesSource:
description: The external source platform for team synchronization. Only "github"
is supported.
enum:
- github
example: github
type: string
x-enum-varnames:
- GITHUB
TeamSyncAttributesType:
description: The type of synchronization operation. Only "link" is supported,
which links existing teams by matching names.
enum:
- link
example: link
type: string
x-enum-varnames:
- LINK
TeamSyncBulkType:
description: Team sync bulk type.
enum:
- team_sync_bulk
example: team_sync_bulk
type: string
x-enum-varnames:
- TEAM_SYNC_BULK
TeamSyncData:
description: Team sync data.
properties:
attributes:
$ref: '#/components/schemas/TeamSyncAttributes'
type:
$ref: '#/components/schemas/TeamSyncBulkType'
required:
- attributes
- type
type: object
TeamSyncRequest:
description: Team sync request.
example:
data:
attributes:
source: github
type: link
type: team_sync_bulk
properties:
data:
$ref: '#/components/schemas/TeamSyncData'
required:
- data
type: object
TeamTarget:
description: Represents a team target for an escalation policy step, including
the team's ID and resource type.
Expand Down Expand Up @@ -65913,6 +65975,71 @@ paths:
permissions:
- teams_read
- teams_manage
/api/v2/team/sync:
post:
description: 'This endpoint attempts to link your existing Datadog teams with
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 operation is read-only on the GitHub side, no teams will be modified
or created.


[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 will not create new Teams in Datadog.'
operationId: SyncTeams
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TeamSyncRequest'
required: true
responses:
'200':
description: OK
'403':
$ref: '#/components/responses/ForbiddenResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Internal Server Error - Unexpected error during linking.
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- teams_manage
summary: Link Teams with GitHub Teams
tags:
- Teams
x-codegen-request-body-name: body
x-permission:
operator: AND
permissions:
- teams_manage
x-unstable: '**Note**: This endpoint is in Preview. To request access, fill
out this [form](https://www.datadoghq.com/product-preview/github-integration-for-teams/).

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/team/{super_team_id}/member_teams:
get:
description: Get all member teams.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-08-15T17:48:19.712Z
24 changes: 24 additions & 0 deletions cassettes/features/v2/teams/Sync-teams-returns-OK-response.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions examples/v2/teams/SyncTeams.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Link Teams with GitHub Teams returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.sync_teams".to_sym] = true
end
api_instance = DatadogAPIClient::V2::TeamsAPI.new

body = DatadogAPIClient::V2::TeamSyncRequest.new({
data: DatadogAPIClient::V2::TeamSyncData.new({
attributes: DatadogAPIClient::V2::TeamSyncAttributes.new({
source: DatadogAPIClient::V2::TeamSyncAttributesSource::GITHUB,
type: DatadogAPIClient::V2::TeamSyncAttributesType::LINK,
}),
type: DatadogAPIClient::V2::TeamSyncBulkType::TEAM_SYNC_BULK,
}),
})
p api_instance.sync_teams(body)
18 changes: 18 additions & 0 deletions examples/v2/teams/SyncTeams_3215592344.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Sync teams returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.sync_teams".to_sym] = true
end
api_instance = DatadogAPIClient::V2::TeamsAPI.new

body = DatadogAPIClient::V2::TeamSyncRequest.new({
data: DatadogAPIClient::V2::TeamSyncData.new({
attributes: DatadogAPIClient::V2::TeamSyncAttributes.new({
source: DatadogAPIClient::V2::TeamSyncAttributesSource::GITHUB,
type: DatadogAPIClient::V2::TeamSyncAttributesType::LINK,
}),
type: DatadogAPIClient::V2::TeamSyncBulkType::TEAM_SYNC_BULK,
}),
})
p api_instance.sync_teams(body)
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2663,6 +2663,9 @@
"v2.CreateTeam" => {
"body" => "TeamCreateRequest",
},
"v2.SyncTeams" => {
"body" => "TeamSyncRequest",
},
"v2.ListMemberTeams" => {
"super_team_id" => "String",
"page_size" => "Integer",
Expand Down
Loading
Loading