Skip to content

Commit 24de123

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

File tree

7 files changed

+23
-4
lines changed

7 files changed

+23
-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:14.580"
2+
"spec_repo_commit": "04d09cb",
3+
"generated": "2025-07-23 09:22:38.369"
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.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
with ApiClient(configuration) as api_client:
1010
api_instance = SyntheticsApi(api_client)
1111
response = api_instance.search_tests(
12+
text="tag:value",
1213
include_full_config=True,
1314
search_suites=True,
1415
facets_only=True,

src/datadog_api_client/v1/api/synthetics_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,11 @@ def __init__(self, api_client=None):
685685
"version": "v1",
686686
},
687687
params_map={
688+
"text": {
689+
"openapi_types": (str,),
690+
"attribute": "text",
691+
"location": "query",
692+
},
688693
"include_full_config": {
689694
"openapi_types": (bool,),
690695
"attribute": "include_full_config",
@@ -1431,6 +1436,7 @@ def patch_test(
14311436
def search_tests(
14321437
self,
14331438
*,
1439+
text: Union[str, UnsetType] = unset,
14341440
include_full_config: Union[bool, UnsetType] = unset,
14351441
search_suites: Union[bool, UnsetType] = unset,
14361442
facets_only: Union[bool, UnsetType] = unset,
@@ -1442,6 +1448,8 @@ def search_tests(
14421448
14431449
Search for Synthetic tests and Test Suites.
14441450
1451+
:param text: The search query.
1452+
:type text: str, optional
14451453
:param include_full_config: If true, include the full configuration for each test in the response.
14461454
:type include_full_config: bool, optional
14471455
:param search_suites: If true, returns suites instead of tests.
@@ -1457,6 +1465,9 @@ def search_tests(
14571465
:rtype: SyntheticsListTestsResponse
14581466
"""
14591467
kwargs: Dict[str, Any] = {}
1468+
if text is not unset:
1469+
kwargs["text"] = text
1470+
14601471
if include_full_config is not unset:
14611472
kwargs["include_full_config"] = include_full_config
14621473

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

tests/v1/cassettes/test_scenarios/test_search_synthetic_tests_with_boolean_query_parameters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interactions:
55
accept:
66
- application/json
77
method: GET
8-
uri: 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
8+
uri: 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
99
response:
1010
body:
1111
string: '{"tests":[],"total":0,"facets":[]}'

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