Skip to content

Commit 937f69b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add text field in synthetics search endpoint (#3022)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 552aeee commit 937f69b

File tree

7 files changed

+31
-4
lines changed

7 files changed

+31
-4
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "bd643af",
3-
"generated": "2025-07-22 16:43:53.927"
2+
"spec_repo_commit": "04d09cb",
3+
"generated": "2025-07-23 09:23:45.770"
44
}

.generator/schemas/v1/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33827,6 +33827,12 @@ paths:
3382733827
description: Search for Synthetic tests and Test Suites.
3382833828
operationId: SearchTests
3382933829
parameters:
33830+
- description: The search query.
33831+
in: query
33832+
name: text
33833+
required: false
33834+
schema:
33835+
type: string
3383033836
- description: If true, include the full configuration for each test in the
3383133837
response.
3383233838
in: query

examples/v1/synthetics/SearchTests_195957771.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static void main(String[] args) {
1515
SyntheticsListTestsResponse result =
1616
apiInstance.searchTests(
1717
new SearchTestsOptionalParameters()
18+
.text("tag:value")
1819
.includeFullConfig(true)
1920
.searchSuites(true)
2021
.facetsOnly(true)

src/main/java/com/datadog/api/client/v1/api/SyntheticsApi.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3918,13 +3918,25 @@ public CompletableFuture<ApiResponse<SyntheticsTestDetails>> patchTestWithHttpIn
39183918

39193919
/** Manage optional parameters to searchTests. */
39203920
public static class SearchTestsOptionalParameters {
3921+
private String text;
39213922
private Boolean includeFullConfig;
39223923
private Boolean searchSuites;
39233924
private Boolean facetsOnly;
39243925
private Long start;
39253926
private Long count;
39263927
private String sort;
39273928

3929+
/**
3930+
* Set text.
3931+
*
3932+
* @param text The search query. (optional)
3933+
* @return SearchTestsOptionalParameters
3934+
*/
3935+
public SearchTestsOptionalParameters text(String text) {
3936+
this.text = text;
3937+
return this;
3938+
}
3939+
39283940
/**
39293941
* Set includeFullConfig.
39303942
*
@@ -4071,6 +4083,7 @@ public CompletableFuture<SyntheticsListTestsResponse> searchTestsAsync(
40714083
public ApiResponse<SyntheticsListTestsResponse> searchTestsWithHttpInfo(
40724084
SearchTestsOptionalParameters parameters) throws ApiException {
40734085
Object localVarPostBody = null;
4086+
String text = parameters.text;
40744087
Boolean includeFullConfig = parameters.includeFullConfig;
40754088
Boolean searchSuites = parameters.searchSuites;
40764089
Boolean facetsOnly = parameters.facetsOnly;
@@ -4083,6 +4096,7 @@ public ApiResponse<SyntheticsListTestsResponse> searchTestsWithHttpInfo(
40834096
List<Pair> localVarQueryParams = new ArrayList<Pair>();
40844097
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
40854098

4099+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "text", text));
40864100
localVarQueryParams.addAll(
40874101
apiClient.parameterToPairs("", "include_full_config", includeFullConfig));
40884102
localVarQueryParams.addAll(apiClient.parameterToPairs("", "search_suites", searchSuites));
@@ -4122,6 +4136,7 @@ public ApiResponse<SyntheticsListTestsResponse> searchTestsWithHttpInfo(
41224136
public CompletableFuture<ApiResponse<SyntheticsListTestsResponse>> searchTestsWithHttpInfoAsync(
41234137
SearchTestsOptionalParameters parameters) {
41244138
Object localVarPostBody = null;
4139+
String text = parameters.text;
41254140
Boolean includeFullConfig = parameters.includeFullConfig;
41264141
Boolean searchSuites = parameters.searchSuites;
41274142
Boolean facetsOnly = parameters.facetsOnly;
@@ -4134,6 +4149,7 @@ public CompletableFuture<ApiResponse<SyntheticsListTestsResponse>> searchTestsWi
41344149
List<Pair> localVarQueryParams = new ArrayList<Pair>();
41354150
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
41364151

4152+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "text", text));
41374153
localVarQueryParams.addAll(
41384154
apiClient.parameterToPairs("", "include_full_config", includeFullConfig));
41394155
localVarQueryParams.addAll(apiClient.parameterToPairs("", "search_suites", searchSuites));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-07-01T15:52:56.329Z
1+
2025-07-22T14:56:49.377Z

src/test/resources/cassettes/features/v1/Search_Synthetic_tests_with_boolean_query_parameters.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"method": "GET",
66
"path": "/api/v1/synthetics/tests/search",
77
"queryStringParameters": {
8+
"text": [
9+
"tag:value"
10+
],
811
"include_full_config": [
912
"true"
1013
],
@@ -43,6 +46,6 @@
4346
"timeToLive": {
4447
"unlimited": true
4548
},
46-
"id": "1e11963d-2717-30b4-9395-3ca218c6dc16"
49+
"id": "681b7431-11c5-f9b9-4b35-628f267b43d1"
4750
}
4851
]

src/test/resources/com/datadog/api/client/v1/api/synthetics.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ Feature: Synthetics
806806
@team:DataDog/synthetics-ct
807807
Scenario: Search Synthetic tests with boolean query parameters
808808
Given new "SearchTests" request
809+
And request contains "text" parameter with value "tag:value"
809810
And request contains "include_full_config" parameter with value true
810811
And request contains "search_suites" parameter with value true
811812
And request contains "facets_only" parameter with value true

0 commit comments

Comments
 (0)