Skip to content

Commit 5ba9762

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add new endpoints for Test Optimization settings for service (#3640)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f81303b commit 5ba9762

24 files changed

+3967
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 363 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67618,6 +67618,250 @@ components:
6761867618
required:
6761967619
- data
6762067620
type: object
67621+
TestOptimizationDeleteServiceSettingsRequest:
67622+
description: Request object for deleting Test Optimization service settings.
67623+
properties:
67624+
data:
67625+
$ref: "#/components/schemas/TestOptimizationDeleteServiceSettingsRequestData"
67626+
required:
67627+
- data
67628+
type: object
67629+
TestOptimizationDeleteServiceSettingsRequestAttributes:
67630+
description: Attributes for deleting Test Optimization service settings.
67631+
properties:
67632+
env:
67633+
description: The environment name. If omitted, defaults to `none`.
67634+
example: prod
67635+
type: string
67636+
repository_id:
67637+
description: The repository identifier.
67638+
example: github.com/datadog/shopist
67639+
minLength: 1
67640+
type: string
67641+
service_name:
67642+
description: The service name.
67643+
example: shopist
67644+
minLength: 1
67645+
type: string
67646+
required:
67647+
- repository_id
67648+
- service_name
67649+
type: object
67650+
TestOptimizationDeleteServiceSettingsRequestData:
67651+
description: Data object for delete service settings request.
67652+
properties:
67653+
attributes:
67654+
$ref: "#/components/schemas/TestOptimizationDeleteServiceSettingsRequestAttributes"
67655+
type:
67656+
$ref: "#/components/schemas/TestOptimizationDeleteServiceSettingsRequestDataType"
67657+
required:
67658+
- type
67659+
- attributes
67660+
type: object
67661+
TestOptimizationDeleteServiceSettingsRequestDataType:
67662+
description: |-
67663+
JSON:API type for delete service settings request.
67664+
The value must always be `test_optimization_delete_service_settings_request`.
67665+
enum:
67666+
- test_optimization_delete_service_settings_request
67667+
example: test_optimization_delete_service_settings_request
67668+
type: string
67669+
x-enum-varnames:
67670+
- TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST
67671+
TestOptimizationGetServiceSettingsRequest:
67672+
description: Request object for getting Test Optimization service settings.
67673+
properties:
67674+
data:
67675+
$ref: "#/components/schemas/TestOptimizationGetServiceSettingsRequestData"
67676+
required:
67677+
- data
67678+
type: object
67679+
TestOptimizationGetServiceSettingsRequestAttributes:
67680+
description: Attributes for requesting Test Optimization service settings.
67681+
properties:
67682+
env:
67683+
description: The environment name. If omitted, defaults to `none`.
67684+
example: prod
67685+
type: string
67686+
repository_id:
67687+
description: The repository identifier.
67688+
example: github.com/datadog/shopist
67689+
minLength: 1
67690+
type: string
67691+
service_name:
67692+
description: The service name.
67693+
example: shopist
67694+
minLength: 1
67695+
type: string
67696+
required:
67697+
- repository_id
67698+
- service_name
67699+
type: object
67700+
TestOptimizationGetServiceSettingsRequestData:
67701+
description: Data object for get service settings request.
67702+
properties:
67703+
attributes:
67704+
$ref: "#/components/schemas/TestOptimizationGetServiceSettingsRequestAttributes"
67705+
type:
67706+
$ref: "#/components/schemas/TestOptimizationGetServiceSettingsRequestDataType"
67707+
required:
67708+
- type
67709+
- attributes
67710+
type: object
67711+
TestOptimizationGetServiceSettingsRequestDataType:
67712+
description: |-
67713+
JSON:API type for get service settings request.
67714+
The value must always be `test_optimization_get_service_settings_request`.
67715+
enum:
67716+
- test_optimization_get_service_settings_request
67717+
example: test_optimization_get_service_settings_request
67718+
type: string
67719+
x-enum-varnames:
67720+
- TEST_OPTIMIZATION_GET_SERVICE_SETTINGS_REQUEST
67721+
TestOptimizationServiceSettingsAttributes:
67722+
description: Attributes for Test Optimization service settings.
67723+
properties:
67724+
auto_test_retries_enabled:
67725+
description: Whether Auto Test Retries are enabled for this service.
67726+
example: false
67727+
type: boolean
67728+
code_coverage_enabled:
67729+
description: Whether Code Coverage is enabled for this service.
67730+
example: false
67731+
type: boolean
67732+
early_flake_detection_enabled:
67733+
description: Whether Early Flake Detection is enabled for this service.
67734+
example: false
67735+
type: boolean
67736+
env:
67737+
description: The environment name.
67738+
example: prod
67739+
type: string
67740+
failed_test_replay_enabled:
67741+
description: Whether Failed Test Replay is enabled for this service.
67742+
example: false
67743+
type: boolean
67744+
pr_comments_enabled:
67745+
description: Whether PR Comments are enabled for this service.
67746+
example: true
67747+
type: boolean
67748+
repository_id:
67749+
description: The repository identifier.
67750+
example: github.com/datadog/shopist
67751+
type: string
67752+
service_name:
67753+
description: The service name.
67754+
example: shopist
67755+
type: string
67756+
test_impact_analysis_enabled:
67757+
description: Whether Test Impact Analysis is enabled for this service.
67758+
example: false
67759+
type: boolean
67760+
type: object
67761+
TestOptimizationServiceSettingsData:
67762+
description: Data object for Test Optimization service settings response.
67763+
properties:
67764+
attributes:
67765+
$ref: "#/components/schemas/TestOptimizationServiceSettingsAttributes"
67766+
id:
67767+
description: Unique identifier for the service settings.
67768+
example: github.com/datadog/shopist::shopist::prod
67769+
type: string
67770+
type:
67771+
$ref: "#/components/schemas/TestOptimizationServiceSettingsType"
67772+
type: object
67773+
TestOptimizationServiceSettingsResponse:
67774+
description: Response object containing Test Optimization service settings.
67775+
properties:
67776+
data:
67777+
$ref: "#/components/schemas/TestOptimizationServiceSettingsData"
67778+
type: object
67779+
TestOptimizationServiceSettingsType:
67780+
description: |-
67781+
JSON:API type for service settings response.
67782+
The value must always be `test_optimization_service_settings`.
67783+
enum:
67784+
- test_optimization_service_settings
67785+
example: test_optimization_service_settings
67786+
type: string
67787+
x-enum-varnames:
67788+
- TEST_OPTIMIZATION_SERVICE_SETTINGS
67789+
TestOptimizationUpdateServiceSettingsRequest:
67790+
description: Request object for updating Test Optimization service settings.
67791+
properties:
67792+
data:
67793+
$ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequestData"
67794+
required:
67795+
- data
67796+
type: object
67797+
TestOptimizationUpdateServiceSettingsRequestAttributes:
67798+
description: |-
67799+
Attributes for updating Test Optimization service settings.
67800+
All non-required fields are optional; only provided fields will be updated.
67801+
properties:
67802+
auto_test_retries_enabled:
67803+
description: Whether Auto Test Retries are enabled for this service.
67804+
example: false
67805+
type: boolean
67806+
code_coverage_enabled:
67807+
description: Whether Code Coverage is enabled for this service.
67808+
example: false
67809+
type: boolean
67810+
early_flake_detection_enabled:
67811+
description: Whether Early Flake Detection is enabled for this service.
67812+
example: false
67813+
type: boolean
67814+
env:
67815+
description: The environment name. If omitted, defaults to `none`.
67816+
example: prod
67817+
type: string
67818+
failed_test_replay_enabled:
67819+
description: Whether Failed Test Replay is enabled for this service.
67820+
example: false
67821+
type: boolean
67822+
pr_comments_enabled:
67823+
description: Whether PR Comments are enabled for this service.
67824+
example: true
67825+
type: boolean
67826+
repository_id:
67827+
description: The repository identifier.
67828+
example: github.com/datadog/shopist
67829+
minLength: 1
67830+
type: string
67831+
service_name:
67832+
description: The service name.
67833+
example: shopist
67834+
minLength: 1
67835+
type: string
67836+
test_impact_analysis_enabled:
67837+
description: Whether Test Impact Analysis is enabled for this service.
67838+
example: false
67839+
type: boolean
67840+
required:
67841+
- repository_id
67842+
- service_name
67843+
type: object
67844+
TestOptimizationUpdateServiceSettingsRequestData:
67845+
description: Data object for update service settings request.
67846+
properties:
67847+
attributes:
67848+
$ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequestAttributes"
67849+
type:
67850+
$ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequestDataType"
67851+
required:
67852+
- type
67853+
- attributes
67854+
type: object
67855+
TestOptimizationUpdateServiceSettingsRequestDataType:
67856+
description: |-
67857+
JSON:API type for update service settings request.
67858+
The value must always be `test_optimization_update_service_settings_request`.
67859+
enum:
67860+
- test_optimization_update_service_settings_request
67861+
example: test_optimization_update_service_settings_request
67862+
type: string
67863+
x-enum-varnames:
67864+
- TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST
6762167865
ThreatHuntingJobDataType:
6762267866
description: Type of payload.
6762367867
enum:
@@ -71644,6 +71888,7 @@ components:
7164471888
teams_manage: Manage Teams. Create, delete, rename, and edit metadata of all Teams. To control Team membership across all Teams, use the User Access Manage permission.
7164571889
teams_read: Read Teams data. A User with this permission can view Team names, metadata, and which Users are on each Team.
7164671890
test_optimization_read: View Test Optimization.
71891+
test_optimization_settings_write: Update service settings in Test Optimization.
7164771892
test_optimization_write: Update flaky tests from Flaky Tests Management of Test Optimization.
7164871893
timeseries_query: Query Timeseries data.
7164971894
usage_read: View your organization's usage and usage attribution.
@@ -77891,6 +78136,124 @@ paths:
7789178136
operator: OR
7789278137
permissions:
7789378138
- ci_visibility_read
78139+
/api/v2/ci/test-optimization/settings/service:
78140+
delete:
78141+
description: |-
78142+
Delete Test Optimization settings for a specific service identified by repository, service name, and environment.
78143+
operationId: DeleteTestOptimizationServiceSettings
78144+
requestBody:
78145+
content:
78146+
application/json:
78147+
schema:
78148+
$ref: "#/components/schemas/TestOptimizationDeleteServiceSettingsRequest"
78149+
required: true
78150+
responses:
78151+
"204":
78152+
description: No Content
78153+
"400":
78154+
$ref: "#/components/responses/BadRequestResponse"
78155+
"403":
78156+
$ref: "#/components/responses/NotAuthorizedResponse"
78157+
"404":
78158+
$ref: "#/components/responses/NotFoundResponse"
78159+
"429":
78160+
$ref: "#/components/responses/TooManyRequestsResponse"
78161+
security:
78162+
- apiKeyAuth: []
78163+
appKeyAuth: []
78164+
- AuthZ:
78165+
- test_optimization_settings_write
78166+
summary: Delete Test Optimization service settings
78167+
tags: ["Test Optimization"]
78168+
x-codegen-request-body-name: body
78169+
x-permission:
78170+
operator: OR
78171+
permissions:
78172+
- test_optimization_settings_write
78173+
x-unstable: |-
78174+
**Note**: This endpoint is in preview and may be subject to change.
78175+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
78176+
patch:
78177+
description: |-
78178+
Partially update Test Optimization settings for a specific service identified by repository, service name, and environment.
78179+
Only provided fields are updated; null or omitted fields are left unchanged.
78180+
operationId: UpdateTestOptimizationServiceSettings
78181+
requestBody:
78182+
content:
78183+
application/json:
78184+
schema:
78185+
$ref: "#/components/schemas/TestOptimizationUpdateServiceSettingsRequest"
78186+
required: true
78187+
responses:
78188+
"200":
78189+
content:
78190+
application/json:
78191+
schema:
78192+
$ref: "#/components/schemas/TestOptimizationServiceSettingsResponse"
78193+
description: OK
78194+
"400":
78195+
$ref: "#/components/responses/BadRequestResponse"
78196+
"403":
78197+
$ref: "#/components/responses/NotAuthorizedResponse"
78198+
"404":
78199+
$ref: "#/components/responses/NotFoundResponse"
78200+
"429":
78201+
$ref: "#/components/responses/TooManyRequestsResponse"
78202+
security:
78203+
- apiKeyAuth: []
78204+
appKeyAuth: []
78205+
- AuthZ:
78206+
- test_optimization_settings_write
78207+
summary: Update Test Optimization service settings
78208+
tags: ["Test Optimization"]
78209+
x-codegen-request-body-name: body
78210+
x-permission:
78211+
operator: OR
78212+
permissions:
78213+
- test_optimization_settings_write
78214+
x-unstable: |-
78215+
**Note**: This endpoint is in preview and may be subject to change.
78216+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
78217+
post:
78218+
description: |-
78219+
Retrieve Test Optimization settings for a specific service identified by repository, service name, and environment.
78220+
operationId: GetTestOptimizationServiceSettings
78221+
requestBody:
78222+
content:
78223+
application/json:
78224+
schema:
78225+
$ref: "#/components/schemas/TestOptimizationGetServiceSettingsRequest"
78226+
required: true
78227+
responses:
78228+
"200":
78229+
content:
78230+
application/json:
78231+
schema:
78232+
$ref: "#/components/schemas/TestOptimizationServiceSettingsResponse"
78233+
description: OK
78234+
"400":
78235+
$ref: "#/components/responses/BadRequestResponse"
78236+
"403":
78237+
$ref: "#/components/responses/NotAuthorizedResponse"
78238+
"404":
78239+
$ref: "#/components/responses/NotFoundResponse"
78240+
"429":
78241+
$ref: "#/components/responses/TooManyRequestsResponse"
78242+
security:
78243+
- apiKeyAuth: []
78244+
appKeyAuth: []
78245+
- AuthZ:
78246+
- test_optimization_read
78247+
summary: Get Test Optimization service settings
78248+
tags: ["Test Optimization"]
78249+
x-codegen-request-body-name: body
78250+
x-permission:
78251+
operator: OR
78252+
permissions:
78253+
- test_optimization_read
78254+
x-unstable: |-
78255+
**Note**: This endpoint is in preview and may be subject to change.
78256+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
7789478257
/api/v2/ci/tests/analytics/aggregate:
7789578258
post:
7789678259
description: |-

0 commit comments

Comments
 (0)