Data object for get Flaky Tests Management policies request.
attributes [required]
object
Attributes for requesting Flaky Tests Management policies.
repository_id [required]
string
The repository identifier.
type [required]
enum
JSON:API type for get Flaky Tests Management policies request.
The value must always be test_optimization_get_flaky_tests_management_policies_request.
Allowed enum values: test_optimization_get_flaky_tests_management_policies_request
Response object containing Flaky Tests Management policies for a repository.
Expand All
Field
Type
Description
data
object
Data object for Flaky Tests Management policies response.
attributes
object
Attributes of the Flaky Tests Management policies for a repository.
attempt_to_fix
object
Configuration for the attempt-to-fix Flaky Tests Management policy.
retries
int64
Number of retries when attempting to fix a flaky test. Must be greater than 0.
disabled
object
Configuration for the disabled Flaky Tests Management policy.
auto_disable_rule
object
Automatic disable triggering rule based on a time window and test status.
enabled
boolean
Whether this auto-disable rule is enabled.
status
enum
Test status that the disable policy applies to.
Must be either active or quarantined.
Allowed enum values: active,quarantined
window_seconds
int64
Time window in seconds over which flakiness is evaluated. Must be greater than 0.
branch_rule
object
Branch filtering rule for a Flaky Tests Management policy.
branches
[string]
List of branches to which the policy applies.
enabled
boolean
Whether this branch rule is enabled.
excluded_branches
[string]
List of branches excluded from the policy.
excluded_test_services
[string]
List of test services excluded from the policy.
enabled
boolean
Whether the disabled policy is enabled.
failure_rate_rule
object
Failure-rate-based rule for the disabled policy.
branches
[string]
List of branches to which this rule applies.
enabled
boolean
Whether this failure rate rule is enabled.
min_runs
int64
Minimum number of runs required before the rule is evaluated. Must be greater than or equal to 0.
status
enum
Test status that the disable policy applies to.
Must be either active or quarantined.
Allowed enum values: active,quarantined
threshold
double
Failure rate threshold (0.0–1.0) above which the rule triggers.
quarantined
object
Configuration for the quarantined Flaky Tests Management policy.
auto_quarantine_rule
object
Automatic quarantine triggering rule based on a time window.
enabled
boolean
Whether this auto-quarantine rule is enabled.
window_seconds
int64
Time window in seconds over which flakiness is evaluated. Must be greater than 0.
branch_rule
object
Branch filtering rule for a Flaky Tests Management policy.
branches
[string]
List of branches to which the policy applies.
enabled
boolean
Whether this branch rule is enabled.
excluded_branches
[string]
List of branches excluded from the policy.
excluded_test_services
[string]
List of test services excluded from the policy.
enabled
boolean
Whether the quarantined policy is enabled.
failure_rate_rule
object
Failure-rate-based rule for the quarantined policy.
branches
[string]
List of branches to which this rule applies.
enabled
boolean
Whether this failure rate rule is enabled.
min_runs
int64
Minimum number of runs required before the rule is evaluated. Must be greater than or equal to 0.
threshold
double
Failure rate threshold (0.0–1.0) above which the rule triggers.
repository_id
string
The repository identifier.
id
string
The repository identifier used as the resource ID.
type
enum
JSON:API type for Flaky Tests Management policies response.
The value must always be test_optimization_flaky_tests_management_policies.
Allowed enum values: test_optimization_flaky_tests_management_policies
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get Flaky Tests Management policies returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.TestOptimizationApi(configuration);constparams: v2.TestOptimizationApiGetFlakyTestsManagementPoliciesRequest={body:{data:{attributes:{repositoryId:"github.com/datadog/shopist",},type:"test_optimization_get_flaky_tests_management_policies_request",},},};apiInstance.getFlakyTestsManagementPolicies(params).then((data: v2.TestOptimizationFlakyTestsManagementPoliciesResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));