Skip to content

Commit 101b012

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

File tree

8 files changed

+38
-8
lines changed

8 files changed

+38
-8
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:45.171"
2+
"spec_repo_commit": "04d09cb",
3+
"generated": "2025-07-23 09:23:52.685"
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
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2025-07-01T15:52:56.329Z"
1+
"2025-07-22T14:56:49.377Z"

cassettes/v1/Synthetics_2658572017/Search-Synthetic-tests-with-boolean-query-parameters_258209479/recording.har

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "1e11963d271730b493953ca218c6dc16",
11+
"_id": "681b743111c5f9b94b35628f267b43d1",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -21,10 +21,14 @@
2121
"value": "application/json"
2222
}
2323
],
24-
"headersSize": 610,
24+
"headersSize": 627,
2525
"httpVersion": "HTTP/1.1",
2626
"method": "GET",
2727
"queryString": [
28+
{
29+
"name": "text",
30+
"value": "tag:value"
31+
},
2832
{
2933
"name": "include_full_config",
3034
"value": "true"
@@ -50,7 +54,7 @@
5054
"value": "name,desc"
5155
}
5256
],
53-
"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"
57+
"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"
5458
},
5559
"response": {
5660
"bodySize": 35,
@@ -72,8 +76,8 @@
7276
"status": 200,
7377
"statusText": "OK"
7478
},
75-
"startedDateTime": "2025-07-01T15:52:56.562Z",
76-
"time": 315
79+
"startedDateTime": "2025-07-22T14:56:49.384Z",
80+
"time": 143
7781
}
7882
],
7983
"pages": [],

examples/v1/synthetics/SearchTests_195957771.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const configuration = client.createConfiguration();
88
const apiInstance = new v1.SyntheticsApi(configuration);
99

1010
const params: v1.SyntheticsApiSearchTestsRequest = {
11+
text: "tag:value",
1112
includeFullConfig: true,
1213
searchSuites: true,
1314
facetsOnly: true,

features/support/scenarios_model_mapping.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,6 +2102,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
21022102
"operationResponseType": "SyntheticsMobileTest",
21032103
},
21042104
"v1.SearchTests": {
2105+
"text": {
2106+
"type": "string",
2107+
"format": "",
2108+
},
21052109
"includeFullConfig": {
21062110
"type": "boolean",
21072111
"format": "",

features/v1/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

packages/datadog-api-client-v1/apis/SyntheticsApi.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ export class SyntheticsApiRequestFactory extends BaseAPIRequestFactory {
10671067
}
10681068

10691069
public async searchTests(
1070+
text?: string,
10701071
includeFullConfig?: boolean,
10711072
searchSuites?: boolean,
10721073
facetsOnly?: boolean,
@@ -1088,6 +1089,13 @@ export class SyntheticsApiRequestFactory extends BaseAPIRequestFactory {
10881089
requestContext.setHttpConfig(_config.httpConfig);
10891090

10901091
// Query Params
1092+
if (text !== undefined) {
1093+
requestContext.setQueryParam(
1094+
"text",
1095+
ObjectSerializer.serialize(text, "string", ""),
1096+
""
1097+
);
1098+
}
10911099
if (includeFullConfig !== undefined) {
10921100
requestContext.setQueryParam(
10931101
"include_full_config",
@@ -3815,6 +3823,11 @@ export interface SyntheticsApiPatchTestRequest {
38153823
}
38163824

38173825
export interface SyntheticsApiSearchTestsRequest {
3826+
/**
3827+
* The search query.
3828+
* @type string
3829+
*/
3830+
text?: string;
38183831
/**
38193832
* If true, include the full configuration for each test in the response.
38203833
* @type boolean
@@ -4551,6 +4564,7 @@ export class SyntheticsApi {
45514564
options?: Configuration
45524565
): Promise<SyntheticsListTestsResponse> {
45534566
const requestContextPromise = this.requestFactory.searchTests(
4567+
param.text,
45544568
param.includeFullConfig,
45554569
param.searchSuites,
45564570
param.facetsOnly,

0 commit comments

Comments
 (0)