Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "bd643af",
"generated": "2025-07-22 16:43:56.388"
"spec_repo_commit": "04d09cb",
"generated": "2025-07-23 09:23:55.056"
}
6 changes: 6 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33827,6 +33827,12 @@ paths:
description: Search for Synthetic tests and Test Suites.
operationId: SearchTests
parameters:
- description: The search query.
in: query
name: text
required: false
schema:
type: string
- description: If true, include the full configuration for each test in the
response.
in: query
Expand Down
10 changes: 10 additions & 0 deletions api/datadogV1/api_synthetics.go
Original file line number Diff line number Diff line change
Expand Up @@ -2246,6 +2246,7 @@ func (a *SyntheticsApi) PatchTest(ctx _context.Context, publicId string, body Sy

// SearchTestsOptionalParameters holds optional parameters for SearchTests.
type SearchTestsOptionalParameters struct {
Text *string
IncludeFullConfig *bool
SearchSuites *bool
FacetsOnly *bool
Expand All @@ -2260,6 +2261,12 @@ func NewSearchTestsOptionalParameters() *SearchTestsOptionalParameters {
return &this
}

// WithText sets the corresponding parameter name and returns the struct.
func (r *SearchTestsOptionalParameters) WithText(text string) *SearchTestsOptionalParameters {
r.Text = &text
return r
}

// WithIncludeFullConfig sets the corresponding parameter name and returns the struct.
func (r *SearchTestsOptionalParameters) WithIncludeFullConfig(includeFullConfig bool) *SearchTestsOptionalParameters {
r.IncludeFullConfig = &includeFullConfig
Expand Down Expand Up @@ -2323,6 +2330,9 @@ func (a *SyntheticsApi) SearchTests(ctx _context.Context, o ...SearchTestsOption
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
if optionalParams.Text != nil {
localVarQueryParams.Add("text", datadog.ParameterToString(*optionalParams.Text, ""))
}
if optionalParams.IncludeFullConfig != nil {
localVarQueryParams.Add("include_full_config", datadog.ParameterToString(*optionalParams.IncludeFullConfig, ""))
}
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/synthetics/SearchTests_195957771.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV1.NewSyntheticsApi(apiClient)
resp, r, err := api.SearchTests(ctx, *datadogV1.NewSearchTestsOptionalParameters().WithIncludeFullConfig(true).WithSearchSuites(true).WithFacetsOnly(true).WithStart(10).WithCount(5).WithSort("name,desc"))
resp, r, err := api.SearchTests(ctx, *datadogV1.NewSearchTestsOptionalParameters().WithText("tag:value").WithIncludeFullConfig(true).WithSearchSuites(true).WithFacetsOnly(true).WithStart(10).WithCount(5).WithSort("name,desc"))

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.SearchTests`: %v\n", err)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-07-01T15:52:56.329Z
2025-07-22T14:56:49.377Z
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interactions:
- application/json
id: 0
method: GET
url: https://api.datadoghq.com/api/v1/synthetics/tests/search?include_full_config=true&search_suites=true&facets_only=true&start=10&count=5&sort=name%2Cdesc
url: https://api.datadoghq.com/api/v1/synthetics/tests/search?text=tag%3Avalue&include_full_config=true&search_suites=true&facets_only=true&start=10&count=5&sort=name%2Cdesc
response:
body: '{"tests":[],"total":0,"facets":[]}'
code: 200
Expand Down
1 change: 1 addition & 0 deletions tests/scenarios/features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ Feature: Synthetics
@team:DataDog/synthetics-ct
Scenario: Search Synthetic tests with boolean query parameters
Given new "SearchTests" request
And request contains "text" parameter with value "tag:value"
And request contains "include_full_config" parameter with value true
And request contains "search_suites" parameter with value true
And request contains "facets_only" parameter with value true
Expand Down
Loading