Skip to content

Commit a87f36b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7b699ba of spec repo
1 parent bd76ff3 commit a87f36b

20 files changed

Lines changed: 1104 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14276,6 +14276,150 @@ components:
1427614276
test_level:
1427714277
$ref: "#/components/schemas/CIAppTestLevel"
1427814278
type: object
14279+
CIAppGitHubAccountAttributes:
14280+
description: Attributes describing a GitHub account's CI Visibility opt-in status.
14281+
properties:
14282+
account:
14283+
description: The GitHub account (organization or user) name.
14284+
example: datadog
14285+
type: string
14286+
enabled:
14287+
description: Whether CI Visibility is enabled at the account level.
14288+
example: true
14289+
type: boolean
14290+
host:
14291+
description: The GitHub host (`github.com` or a GitHub Enterprise Server (GHES) hostname) this account belongs to.
14292+
example: github.com
14293+
type: string
14294+
repo_count:
14295+
description: The number of repositories known for this account.
14296+
example: 12
14297+
format: int64
14298+
type: integer
14299+
repositories:
14300+
description: The repositories belonging to this account, with their individual opt-in status.
14301+
items:
14302+
$ref: "#/components/schemas/CIAppGitHubAccountRepository"
14303+
type: array
14304+
type: object
14305+
CIAppGitHubAccountData:
14306+
description: Data object for a GitHub account.
14307+
properties:
14308+
attributes:
14309+
$ref: "#/components/schemas/CIAppGitHubAccountAttributes"
14310+
id:
14311+
description: |-
14312+
The account's unique identifier, in the form `<host>/<account name>`
14313+
(for example `github.com/datadog`).
14314+
example: github.com/datadog
14315+
type: string
14316+
type:
14317+
$ref: "#/components/schemas/CIAppGitHubAccountType"
14318+
required:
14319+
- id
14320+
- type
14321+
- attributes
14322+
type: object
14323+
CIAppGitHubAccountRepository:
14324+
description: A GitHub repository within a GitHub account, and its CI Visibility opt-in status.
14325+
properties:
14326+
enabled:
14327+
description: Whether CI Visibility is enabled for this repository.
14328+
example: true
14329+
type: boolean
14330+
name:
14331+
description: The repository name.
14332+
example: shopist
14333+
type: string
14334+
type: object
14335+
CIAppGitHubAccountResponse:
14336+
description: Response object containing a single GitHub account's CI Visibility opt-in status.
14337+
properties:
14338+
data:
14339+
$ref: "#/components/schemas/CIAppGitHubAccountData"
14340+
required:
14341+
- data
14342+
type: object
14343+
CIAppGitHubAccountType:
14344+
description: |-
14345+
JSON:API type for the GitHub account resource.
14346+
The value must always be `ci_github_account`.
14347+
enum:
14348+
- ci_github_account
14349+
example: ci_github_account
14350+
type: string
14351+
x-enum-varnames:
14352+
- CI_GITHUB_ACCOUNT
14353+
CIAppGitHubAccountUpdateRequest:
14354+
description: Request object for updating a GitHub account's CI Visibility opt-in status.
14355+
properties:
14356+
data:
14357+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequestData"
14358+
required:
14359+
- data
14360+
type: object
14361+
CIAppGitHubAccountUpdateRequestAttributes:
14362+
description: |-
14363+
Attributes for updating a GitHub account's CI Visibility opt-in status.
14364+
At least one of `enabled` or `repository.enabled` must be provided.
14365+
properties:
14366+
account:
14367+
description: The GitHub account (organization or user) name to update, identified by name.
14368+
example: datadog
14369+
minLength: 1
14370+
type: string
14371+
enabled:
14372+
description: Whether to enable or disable CI Visibility at the account level.
14373+
example: true
14374+
type: boolean
14375+
host:
14376+
description: |-
14377+
The GitHub host (`github.com` or a GHES hostname) the account belongs to. Required to disambiguate
14378+
when the same account name exists on more than one host.
14379+
example: github.com
14380+
type: string
14381+
repository:
14382+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequestRepository"
14383+
required:
14384+
- account
14385+
type: object
14386+
CIAppGitHubAccountUpdateRequestData:
14387+
description: Data object for updating a GitHub account's CI Visibility opt-in status.
14388+
properties:
14389+
attributes:
14390+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequestAttributes"
14391+
type:
14392+
$ref: "#/components/schemas/CIAppGitHubAccountType"
14393+
required:
14394+
- type
14395+
- attributes
14396+
type: object
14397+
CIAppGitHubAccountUpdateRequestRepository:
14398+
description: Repository-level opt-in change to apply, identified by name.
14399+
properties:
14400+
enabled:
14401+
description: Whether to enable or disable CI Visibility for this repository.
14402+
example: true
14403+
type: boolean
14404+
name:
14405+
description: The repository name to update.
14406+
example: shopist
14407+
minLength: 1
14408+
type: string
14409+
required:
14410+
- name
14411+
- enabled
14412+
type: object
14413+
CIAppGitHubAccountsResponse:
14414+
description: Response object containing a list of GitHub accounts and their CI Visibility opt-in status.
14415+
properties:
14416+
data:
14417+
items:
14418+
$ref: "#/components/schemas/CIAppGitHubAccountData"
14419+
type: array
14420+
required:
14421+
- data
14422+
type: object
1427914423
CIAppGitInfo:
1428014424
description: |-
1428114425
If pipelines are triggered due to actions to a Git repository, then all payloads must contain this.
@@ -130198,6 +130342,127 @@ paths:
130198130342
x-unstable: |-
130199130343
**Note**: This endpoint is in preview and is subject to change.
130200130344
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
130345+
/api/v2/ci/github/accounts:
130346+
get:
130347+
description: |-
130348+
Retrieve the list of GitHub accounts (organizations or users) available to this Datadog organization
130349+
through its GitHub App installation, along with each account's and repository's CI Visibility opt-in status.
130350+
operationId: ListCIAppGitHubAccounts
130351+
responses:
130352+
"200":
130353+
content:
130354+
application/json:
130355+
examples:
130356+
default:
130357+
value:
130358+
data:
130359+
- attributes:
130360+
account: datadog
130361+
enabled: true
130362+
host: github.com
130363+
repo_count: 2
130364+
repositories:
130365+
- enabled: true
130366+
name: shopist
130367+
- enabled: false
130368+
name: dd-source
130369+
id: github.com/datadog
130370+
type: ci_github_account
130371+
schema:
130372+
$ref: "#/components/schemas/CIAppGitHubAccountsResponse"
130373+
description: OK
130374+
"400":
130375+
$ref: "#/components/responses/BadRequestResponse"
130376+
"403":
130377+
$ref: "#/components/responses/NotAuthorizedResponse"
130378+
"404":
130379+
$ref: "#/components/responses/NotFoundResponse"
130380+
"429":
130381+
$ref: "#/components/responses/TooManyRequestsResponse"
130382+
security:
130383+
- apiKeyAuth: []
130384+
appKeyAuth: []
130385+
- AuthZ:
130386+
- integrations_read
130387+
summary: List GitHub CI Visibility status
130388+
tags: ["CI Visibility GitHub Accounts"]
130389+
x-permission:
130390+
operator: OR
130391+
permissions:
130392+
- integrations_read
130393+
patch:
130394+
description: |-
130395+
Enable or disable CI Visibility for a GitHub account, one of its repositories, or both in the same request.
130396+
The account (and, optionally, repository) are identified by name. Account-level and repository-level
130397+
changes are independent and may both be supplied in the same request. At least one of `enabled` or
130398+
`repository.enabled` must be provided. If the account name matches installations on more than one host,
130399+
`host` must be supplied to disambiguate, otherwise a 409 is returned. Returns a 404 if the CI Visibility
130400+
GitHub integration is not enabled for this organization, or if the given account or repository cannot be
130401+
found by name.
130402+
operationId: UpdateCIAppGitHubAccount
130403+
requestBody:
130404+
content:
130405+
application/json:
130406+
examples:
130407+
default:
130408+
value:
130409+
data:
130410+
attributes:
130411+
account: datadog
130412+
enabled: true
130413+
host: github.com
130414+
repository:
130415+
enabled: true
130416+
name: shopist
130417+
type: ci_github_account
130418+
schema:
130419+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequest"
130420+
required: true
130421+
responses:
130422+
"200":
130423+
content:
130424+
application/json:
130425+
examples:
130426+
default:
130427+
value:
130428+
data:
130429+
attributes:
130430+
account: datadog
130431+
enabled: true
130432+
host: github.com
130433+
repo_count: 2
130434+
repositories:
130435+
- enabled: true
130436+
name: shopist
130437+
- enabled: false
130438+
name: dd-source
130439+
id: github.com/datadog
130440+
type: ci_github_account
130441+
schema:
130442+
$ref: "#/components/schemas/CIAppGitHubAccountResponse"
130443+
description: OK
130444+
"400":
130445+
$ref: "#/components/responses/BadRequestResponse"
130446+
"403":
130447+
$ref: "#/components/responses/NotAuthorizedResponse"
130448+
"404":
130449+
$ref: "#/components/responses/NotFoundResponse"
130450+
"409":
130451+
$ref: "#/components/responses/ConflictResponse"
130452+
"429":
130453+
$ref: "#/components/responses/TooManyRequestsResponse"
130454+
security:
130455+
- apiKeyAuth: []
130456+
appKeyAuth: []
130457+
- AuthZ:
130458+
- ci_provider_settings_write
130459+
summary: Update GitHub CI Visibility status
130460+
tags: ["CI Visibility GitHub Accounts"]
130461+
x-codegen-request-body-name: body
130462+
x-permission:
130463+
operator: OR
130464+
permissions:
130465+
- ci_provider_settings_write
130201130466
/api/v2/ci/pipeline:
130202130467
post:
130203130468
description: |-
@@ -212744,6 +213009,10 @@ tags:
212744213009
- description: |-
212745213010
Use the Bits AI endpoints to retrieve AI-powered investigations.
212746213011
name: Bits AI
213012+
- description: |-
213013+
Manage CI Visibility opt-in status for your GitHub accounts and repositories. See the
213014+
[CI Visibility GitHub Actions setup page](https://docs.datadoghq.com/continuous_integration/setup_dd_ci_visibility_pipelines/github_actions/) for more information.
213015+
name: CI Visibility GitHub Accounts
212747213016
- description: |-
212748213017
Search or aggregate your CI Visibility pipeline events and send them to your Datadog site over HTTP. See the [CI Pipeline Visibility in Datadog page](https://docs.datadoghq.com/continuous_integration/pipelines/) for more information.
212749213018
name: CI Visibility Pipelines

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ datadog\_api\_client.v2.api.change\_management\_api module
137137
:members:
138138
:show-inheritance:
139139

140+
datadog\_api\_client.v2.api.ci\_visibility\_git\_hub\_accounts\_api module
141+
--------------------------------------------------------------------------
142+
143+
.. automodule:: datadog_api_client.v2.api.ci_visibility_git_hub_accounts_api
144+
:members:
145+
:show-inheritance:
146+
140147
datadog\_api\_client.v2.api.ci\_visibility\_pipelines\_api module
141148
-----------------------------------------------------------------
142149

docs/datadog_api_client.v2.model.rst

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6304,6 +6304,76 @@ datadog\_api\_client.v2.model.ci\_app\_event\_attributes module
63046304
:members:
63056305
:show-inheritance:
63066306

6307+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_attributes module
6308+
---------------------------------------------------------------------------
6309+
6310+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_attributes
6311+
:members:
6312+
:show-inheritance:
6313+
6314+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_data module
6315+
---------------------------------------------------------------------
6316+
6317+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_data
6318+
:members:
6319+
:show-inheritance:
6320+
6321+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_repository module
6322+
---------------------------------------------------------------------------
6323+
6324+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_repository
6325+
:members:
6326+
:show-inheritance:
6327+
6328+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_response module
6329+
-------------------------------------------------------------------------
6330+
6331+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_response
6332+
:members:
6333+
:show-inheritance:
6334+
6335+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_type module
6336+
---------------------------------------------------------------------
6337+
6338+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_type
6339+
:members:
6340+
:show-inheritance:
6341+
6342+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_update\_request module
6343+
--------------------------------------------------------------------------------
6344+
6345+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_update_request
6346+
:members:
6347+
:show-inheritance:
6348+
6349+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_update\_request\_attributes module
6350+
--------------------------------------------------------------------------------------------
6351+
6352+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_update_request_attributes
6353+
:members:
6354+
:show-inheritance:
6355+
6356+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_update\_request\_data module
6357+
--------------------------------------------------------------------------------------
6358+
6359+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_update_request_data
6360+
:members:
6361+
:show-inheritance:
6362+
6363+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_account\_update\_request\_repository module
6364+
--------------------------------------------------------------------------------------------
6365+
6366+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_account_update_request_repository
6367+
:members:
6368+
:show-inheritance:
6369+
6370+
datadog\_api\_client.v2.model.ci\_app\_git\_hub\_accounts\_response module
6371+
--------------------------------------------------------------------------
6372+
6373+
.. automodule:: datadog_api_client.v2.model.ci_app_git_hub_accounts_response
6374+
:members:
6375+
:show-inheritance:
6376+
63076377
datadog\_api\_client.v2.model.ci\_app\_git\_info module
63086378
-------------------------------------------------------
63096379

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
List GitHub CI Visibility status returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.ci_visibility_git_hub_accounts_api import CIVisibilityGitHubAccountsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = CIVisibilityGitHubAccountsApi(api_client)
11+
response = api_instance.list_ci_app_git_hub_accounts()
12+
13+
print(response)

0 commit comments

Comments
 (0)