Skip to content

Commit ff73b83

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ac0a49b of spec repo
1 parent 51ef7a2 commit ff73b83

16 files changed

Lines changed: 2491 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14293,6 +14293,151 @@ components:
1429314293
test_level:
1429414294
$ref: "#/components/schemas/CIAppTestLevel"
1429514295
type: object
14296+
CIAppGitHubAccountAttributes:
14297+
description: Attributes describing a GitHub account's CI Visibility opt-in status.
14298+
properties:
14299+
account:
14300+
description: The GitHub account (organization or user) name.
14301+
example: datadog
14302+
type: string
14303+
enabled:
14304+
description: Whether CI Visibility is enabled at the account level.
14305+
example: true
14306+
type: boolean
14307+
host:
14308+
description: The GitHub host (`github.com` or a GHES hostname) this account belongs to.
14309+
example: github.com
14310+
type: string
14311+
repo_count:
14312+
description: The number of repositories known for this account.
14313+
example: 12
14314+
format: int64
14315+
type: integer
14316+
repositories:
14317+
description: The repositories belonging to this account, with their individual opt-in status.
14318+
items:
14319+
$ref: "#/components/schemas/CIAppGitHubAccountRepository"
14320+
type: array
14321+
type: object
14322+
CIAppGitHubAccountData:
14323+
description: Data object for a GitHub account.
14324+
properties:
14325+
attributes:
14326+
$ref: "#/components/schemas/CIAppGitHubAccountAttributes"
14327+
id:
14328+
description: |-
14329+
The account's unique identifier, in the form `<host>/<account name>`
14330+
(for example `github.com/datadog`).
14331+
example: github.com/datadog
14332+
type: string
14333+
type:
14334+
$ref: "#/components/schemas/CIAppGitHubAccountType"
14335+
required:
14336+
- id
14337+
- type
14338+
- attributes
14339+
type: object
14340+
CIAppGitHubAccountRepository:
14341+
description: A GitHub repository within a GitHub account, and its CI Visibility opt-in status.
14342+
properties:
14343+
enabled:
14344+
description: Whether CI Visibility is enabled for this repository.
14345+
example: true
14346+
type: boolean
14347+
name:
14348+
description: The repository name.
14349+
example: shopist
14350+
type: string
14351+
type: object
14352+
CIAppGitHubAccountResponse:
14353+
description: Response object containing a single GitHub account's CI Visibility opt-in status.
14354+
properties:
14355+
data:
14356+
$ref: "#/components/schemas/CIAppGitHubAccountData"
14357+
required:
14358+
- data
14359+
type: object
14360+
CIAppGitHubAccountType:
14361+
description: |-
14362+
JSON:API type for the GitHub account resource.
14363+
The value must always be `ci_github_account`.
14364+
enum:
14365+
- ci_github_account
14366+
example: ci_github_account
14367+
type: string
14368+
x-enum-varnames:
14369+
- CI_GITHUB_ACCOUNT
14370+
CIAppGitHubAccountUpdateRequest:
14371+
description: Request object for updating a GitHub account's CI Visibility opt-in status.
14372+
properties:
14373+
data:
14374+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequestData"
14375+
required:
14376+
- data
14377+
type: object
14378+
CIAppGitHubAccountUpdateRequestAttributes:
14379+
description: |-
14380+
Attributes for updating a GitHub account's CI Visibility opt-in status.
14381+
At least one of `enabled` or `repository.enabled` must be provided.
14382+
Account-level and repository-level opt-in changes are independent and may both be supplied in the same request.
14383+
properties:
14384+
account:
14385+
description: The GitHub account (organization or user) name to update, identified by name.
14386+
example: datadog
14387+
minLength: 1
14388+
type: string
14389+
enabled:
14390+
description: Whether to enable or disable CI Visibility at the account level.
14391+
example: true
14392+
type: boolean
14393+
host:
14394+
description: |-
14395+
The GitHub host (`github.com` or a GHES hostname) the account belongs to. Required to disambiguate
14396+
when the same account name exists on more than one host.
14397+
example: github.com
14398+
type: string
14399+
repository:
14400+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequestRepository"
14401+
required:
14402+
- account
14403+
type: object
14404+
CIAppGitHubAccountUpdateRequestData:
14405+
description: Data object for updating a GitHub account's CI Visibility opt-in status.
14406+
properties:
14407+
attributes:
14408+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequestAttributes"
14409+
type:
14410+
$ref: "#/components/schemas/CIAppGitHubAccountType"
14411+
required:
14412+
- type
14413+
- attributes
14414+
type: object
14415+
CIAppGitHubAccountUpdateRequestRepository:
14416+
description: Repository-level opt-in change to apply, identified by name.
14417+
properties:
14418+
enabled:
14419+
description: Whether to enable or disable CI Visibility for this repository.
14420+
example: true
14421+
type: boolean
14422+
name:
14423+
description: The repository name to update.
14424+
example: shopist
14425+
minLength: 1
14426+
type: string
14427+
required:
14428+
- name
14429+
- enabled
14430+
type: object
14431+
CIAppGitHubAccountsResponse:
14432+
description: Response object containing a list of GitHub accounts and their CI Visibility opt-in status.
14433+
properties:
14434+
data:
14435+
items:
14436+
$ref: "#/components/schemas/CIAppGitHubAccountData"
14437+
type: array
14438+
required:
14439+
- data
14440+
type: object
1429614441
CIAppGitInfo:
1429714442
description: |-
1429814443
If pipelines are triggered due to actions to a Git repository, then all payloads must contain this.
@@ -130420,6 +130565,127 @@ paths:
130420130565
x-unstable: |-
130421130566
**Note**: This endpoint is in preview and is subject to change.
130422130567
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
130568+
/api/v2/ci/github/accounts:
130569+
get:
130570+
description: |-
130571+
Retrieve the list of GitHub accounts (organizations or users) available to this Datadog organization
130572+
through its GitHub App installation, along with each account's and repository's CI Visibility opt-in status.
130573+
operationId: ListCIAppGitHubAccounts
130574+
responses:
130575+
"200":
130576+
content:
130577+
application/json:
130578+
examples:
130579+
default:
130580+
value:
130581+
data:
130582+
- attributes:
130583+
account: datadog
130584+
enabled: true
130585+
host: github.com
130586+
repo_count: 2
130587+
repositories:
130588+
- enabled: true
130589+
name: shopist
130590+
- enabled: false
130591+
name: dd-source
130592+
id: github.com/datadog
130593+
type: ci_github_account
130594+
schema:
130595+
$ref: "#/components/schemas/CIAppGitHubAccountsResponse"
130596+
description: OK
130597+
"400":
130598+
$ref: "#/components/responses/BadRequestResponse"
130599+
"403":
130600+
$ref: "#/components/responses/NotAuthorizedResponse"
130601+
"404":
130602+
$ref: "#/components/responses/NotFoundResponse"
130603+
"429":
130604+
$ref: "#/components/responses/TooManyRequestsResponse"
130605+
security:
130606+
- apiKeyAuth: []
130607+
appKeyAuth: []
130608+
- AuthZ:
130609+
- integrations_read
130610+
summary: List GitHub CI Visibility status
130611+
tags: ["CI Visibility GitHub Accounts"]
130612+
x-permission:
130613+
operator: OR
130614+
permissions:
130615+
- integrations_read
130616+
patch:
130617+
description: |-
130618+
Enable or disable CI Visibility for a GitHub account, one of its repositories, or both in the same request.
130619+
The account (and, optionally, repository) are identified by name. Account-level and repository-level
130620+
changes are independent and may both be supplied in the same request. At least one of `enabled` or
130621+
`repository.enabled` must be provided. If the account name matches installations on more than one host,
130622+
`host` must be supplied to disambiguate, otherwise a 409 is returned. Returns a 404 if the CI Visibility
130623+
GitHub integration is not enabled for this organization, or if the given account or repository cannot be
130624+
found by name.
130625+
operationId: UpdateCIAppGitHubAccount
130626+
requestBody:
130627+
content:
130628+
application/json:
130629+
examples:
130630+
default:
130631+
value:
130632+
data:
130633+
attributes:
130634+
account: datadog
130635+
enabled: true
130636+
host: github.com
130637+
repository:
130638+
enabled: true
130639+
name: shopist
130640+
type: ci_github_account
130641+
schema:
130642+
$ref: "#/components/schemas/CIAppGitHubAccountUpdateRequest"
130643+
required: true
130644+
responses:
130645+
"200":
130646+
content:
130647+
application/json:
130648+
examples:
130649+
default:
130650+
value:
130651+
data:
130652+
attributes:
130653+
account: datadog
130654+
enabled: true
130655+
host: github.com
130656+
repo_count: 2
130657+
repositories:
130658+
- enabled: true
130659+
name: shopist
130660+
- enabled: false
130661+
name: dd-source
130662+
id: github.com/datadog
130663+
type: ci_github_account
130664+
schema:
130665+
$ref: "#/components/schemas/CIAppGitHubAccountResponse"
130666+
description: OK
130667+
"400":
130668+
$ref: "#/components/responses/BadRequestResponse"
130669+
"403":
130670+
$ref: "#/components/responses/NotAuthorizedResponse"
130671+
"404":
130672+
$ref: "#/components/responses/NotFoundResponse"
130673+
"409":
130674+
$ref: "#/components/responses/ConflictResponse"
130675+
"429":
130676+
$ref: "#/components/responses/TooManyRequestsResponse"
130677+
security:
130678+
- apiKeyAuth: []
130679+
appKeyAuth: []
130680+
- AuthZ:
130681+
- ci_provider_settings_write
130682+
summary: Update GitHub CI Visibility status
130683+
tags: ["CI Visibility GitHub Accounts"]
130684+
x-codegen-request-body-name: body
130685+
x-permission:
130686+
operator: OR
130687+
permissions:
130688+
- ci_provider_settings_write
130423130689
/api/v2/ci/pipeline:
130424130690
post:
130425130691
description: |-
@@ -213105,6 +213371,10 @@ tags:
213105213371
- description: |-
213106213372
Use the Bits AI endpoints to retrieve AI-powered investigations.
213107213373
name: Bits AI
213374+
- description: |-
213375+
Manage CI Visibility opt-in status for your GitHub accounts and repositories. See the
213376+
[CI Visibility GitHub Actions setup page](https://docs.datadoghq.com/continuous_integration/setup_dd_ci_visibility_pipelines/github_actions/) for more information.
213377+
name: CI Visibility GitHub Accounts
213108213378
- description: |-
213109213379
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.
213110213380
name: CI Visibility Pipelines
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// List GitHub CI Visibility status returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CiVisibilityGitHubAccountsApi;
6+
import com.datadog.api.client.v2.model.CIAppGitHubAccountsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
CiVisibilityGitHubAccountsApi apiInstance = new CiVisibilityGitHubAccountsApi(defaultClient);
12+
13+
try {
14+
CIAppGitHubAccountsResponse result = apiInstance.listCIAppGitHubAccounts();
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println(
18+
"Exception when calling CiVisibilityGitHubAccountsApi#listCIAppGitHubAccounts");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Update GitHub CI Visibility status returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CiVisibilityGitHubAccountsApi;
6+
import com.datadog.api.client.v2.model.CIAppGitHubAccountResponse;
7+
import com.datadog.api.client.v2.model.CIAppGitHubAccountType;
8+
import com.datadog.api.client.v2.model.CIAppGitHubAccountUpdateRequest;
9+
import com.datadog.api.client.v2.model.CIAppGitHubAccountUpdateRequestAttributes;
10+
import com.datadog.api.client.v2.model.CIAppGitHubAccountUpdateRequestData;
11+
import com.datadog.api.client.v2.model.CIAppGitHubAccountUpdateRequestRepository;
12+
13+
public class Example {
14+
public static void main(String[] args) {
15+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
16+
CiVisibilityGitHubAccountsApi apiInstance = new CiVisibilityGitHubAccountsApi(defaultClient);
17+
18+
CIAppGitHubAccountUpdateRequest body =
19+
new CIAppGitHubAccountUpdateRequest()
20+
.data(
21+
new CIAppGitHubAccountUpdateRequestData()
22+
.attributes(
23+
new CIAppGitHubAccountUpdateRequestAttributes()
24+
.account("datadog")
25+
.enabled(true)
26+
.host("github.com")
27+
.repository(
28+
new CIAppGitHubAccountUpdateRequestRepository()
29+
.enabled(true)
30+
.name("shopist")))
31+
.type(CIAppGitHubAccountType.CI_GITHUB_ACCOUNT));
32+
33+
try {
34+
CIAppGitHubAccountResponse result = apiInstance.updateCIAppGitHubAccount(body);
35+
System.out.println(result);
36+
} catch (ApiException e) {
37+
System.err.println(
38+
"Exception when calling CiVisibilityGitHubAccountsApi#updateCIAppGitHubAccount");
39+
System.err.println("Status code: " + e.getCode());
40+
System.err.println("Reason: " + e.getResponseBody());
41+
System.err.println("Response headers: " + e.getResponseHeaders());
42+
e.printStackTrace();
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)