Skip to content

Commit 5d2bcc7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2546358 of spec repo
1 parent c1fdaf3 commit 5d2bcc7

File tree

16 files changed

+813
-47
lines changed

16 files changed

+813
-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": "69305be",
3-
"generated": "2025-08-05 16:20:32.413"
2+
"spec_repo_commit": "2546358",
3+
"generated": "2025-08-05 17:46:46.581"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42161,6 +42161,68 @@ components:
4216142161
urgency:
4216242162
$ref: '#/components/schemas/Urgency'
4216342163
type: object
42164+
TeamSyncAttributes:
42165+
description: Team sync attributes.
42166+
properties:
42167+
source:
42168+
$ref: '#/components/schemas/TeamSyncAttributesSource'
42169+
type:
42170+
$ref: '#/components/schemas/TeamSyncAttributesType'
42171+
required:
42172+
- source
42173+
- type
42174+
type: object
42175+
TeamSyncAttributesSource:
42176+
description: The external source platform for team synchronization. Only "github"
42177+
is supported.
42178+
enum:
42179+
- github
42180+
example: github
42181+
type: string
42182+
x-enum-varnames:
42183+
- GITHUB
42184+
TeamSyncAttributesType:
42185+
description: The type of synchronization operation. Only "link" is supported,
42186+
which links existing teams by matching names.
42187+
enum:
42188+
- link
42189+
example: link
42190+
type: string
42191+
x-enum-varnames:
42192+
- LINK
42193+
TeamSyncBulkType:
42194+
description: Team sync bulk type.
42195+
enum:
42196+
- team_sync_bulk
42197+
example: team_sync_bulk
42198+
type: string
42199+
x-enum-varnames:
42200+
- TEAM_SYNC_BULK
42201+
TeamSyncData:
42202+
description: Team sync data.
42203+
properties:
42204+
attributes:
42205+
$ref: '#/components/schemas/TeamSyncAttributes'
42206+
type:
42207+
$ref: '#/components/schemas/TeamSyncBulkType'
42208+
required:
42209+
- attributes
42210+
- type
42211+
type: object
42212+
TeamSyncRequest:
42213+
description: Team sync request.
42214+
example:
42215+
data:
42216+
attributes:
42217+
source: github
42218+
type: link
42219+
type: team_sync_bulk
42220+
properties:
42221+
data:
42222+
$ref: '#/components/schemas/TeamSyncData'
42223+
required:
42224+
- data
42225+
type: object
4216442226
TeamTarget:
4216542227
description: Represents a team target for an escalation policy step, including
4216642228
the team's ID and resource type.
@@ -65207,6 +65269,73 @@ paths:
6520765269
permissions:
6520865270
- teams_read
6520965271
- teams_manage
65272+
/api/v2/team/sync:
65273+
post:
65274+
description: 'This endpoint attempts to link your existing Datadog teams with
65275+
GitHub teams by matching their names.
65276+
65277+
It evaluates all current Datadog teams and compares them against teams in
65278+
the GitHub organization
65279+
65280+
connected to your Datadog account, based on Datadog Team handle and GitHub
65281+
Team slug
65282+
65283+
(lowercased and kebab-cased).
65284+
65285+
65286+
This operation is read-only on the GitHub side, no teams will be modified
65287+
or created.
65288+
65289+
65290+
A GitHub organization must be connected to your Datadog account. The Datadog
65291+
user must have the
65292+
65293+
`Teams Manage` permission, and the GitHub App integrated with Datadog must
65294+
have the `Members Read`
65295+
65296+
permission. Matching is performed by comparing the Datadog team handle to
65297+
the GitHub team slug
65298+
65299+
using a normalized exact match; case is ignored and spaces are removed. No
65300+
modifications are made
65301+
65302+
to teams in GitHub. This will not create new Teams in Datadog.'
65303+
operationId: SyncTeams
65304+
requestBody:
65305+
content:
65306+
application/json:
65307+
schema:
65308+
$ref: '#/components/schemas/TeamSyncRequest'
65309+
required: true
65310+
responses:
65311+
'200':
65312+
description: OK
65313+
'403':
65314+
$ref: '#/components/responses/ForbiddenResponse'
65315+
'429':
65316+
$ref: '#/components/responses/TooManyRequestsResponse'
65317+
'500':
65318+
content:
65319+
application/json:
65320+
schema:
65321+
$ref: '#/components/schemas/APIErrorResponse'
65322+
description: Internal Server Error - Unexpected error during linking.
65323+
security:
65324+
- apiKeyAuth: []
65325+
appKeyAuth: []
65326+
- AuthZ:
65327+
- teams_manage
65328+
summary: Link Teams with GitHub Teams
65329+
tags:
65330+
- Teams
65331+
x-codegen-request-body-name: body
65332+
x-permission:
65333+
operator: AND
65334+
permissions:
65335+
- teams_manage
65336+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
65337+
65338+
contact [Datadog support](https://docs.datadoghq.com/help/).'
6521065339
/api/v2/team/{super_team_id}/member_teams:
6521165340
get:
6521265341
description: Get all member teams.

examples/v2/teams/SyncTeams.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Link Teams with GitHub Teams returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.sync_teams".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
8+
9+
body = DatadogAPIClient::V2::TeamSyncRequest.new({
10+
data: DatadogAPIClient::V2::TeamSyncData.new({
11+
attributes: DatadogAPIClient::V2::TeamSyncAttributes.new({
12+
source: DatadogAPIClient::V2::TeamSyncAttributesSource::GITHUB,
13+
type: DatadogAPIClient::V2::TeamSyncAttributesType::LINK,
14+
}),
15+
type: DatadogAPIClient::V2::TeamSyncBulkType::TEAM_SYNC_BULK,
16+
}),
17+
})
18+
p api_instance.sync_teams(body)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Sync teams returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::TeamsAPI.new
5+
6+
body = DatadogAPIClient::V2::TeamSyncRequest.new({
7+
data: DatadogAPIClient::V2::TeamSyncData.new({
8+
attributes: DatadogAPIClient::V2::TeamSyncAttributes.new({
9+
source: DatadogAPIClient::V2::TeamSyncAttributesSource::GITHUB,
10+
type: DatadogAPIClient::V2::TeamSyncAttributesType::LINK,
11+
}),
12+
type: DatadogAPIClient::V2::TeamSyncBulkType::TEAM_SYNC_BULK,
13+
}),
14+
})
15+
p api_instance.sync_teams(body)

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,6 +2657,9 @@
26572657
"v2.CreateTeam" => {
26582658
"body" => "TeamCreateRequest",
26592659
},
2660+
"v2.SyncTeams" => {
2661+
"body" => "TeamSyncRequest",
2662+
},
26602663
"v2.ListMemberTeams" => {
26612664
"super_team_id" => "String",
26622665
"page_size" => "Integer",

0 commit comments

Comments
 (0)