Skip to content

Add text field in synthetics search endpoint #2722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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:14.580"
"spec_repo_commit": "04d09cb",
"generated": "2025-07-23 09:22:38.369"
}
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
1 change: 1 addition & 0 deletions examples/v1/synthetics/SearchTests_195957771.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
with ApiClient(configuration) as api_client:
api_instance = SyntheticsApi(api_client)
response = api_instance.search_tests(
text="tag:value",
include_full_config=True,
search_suites=True,
facets_only=True,
Expand Down
11 changes: 11 additions & 0 deletions src/datadog_api_client/v1/api/synthetics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,11 @@ def __init__(self, api_client=None):
"version": "v1",
},
params_map={
"text": {
"openapi_types": (str,),
"attribute": "text",
"location": "query",
},
"include_full_config": {
"openapi_types": (bool,),
"attribute": "include_full_config",
Expand Down Expand Up @@ -1431,6 +1436,7 @@ def patch_test(
def search_tests(
self,
*,
text: Union[str, UnsetType] = unset,
include_full_config: Union[bool, UnsetType] = unset,
search_suites: Union[bool, UnsetType] = unset,
facets_only: Union[bool, UnsetType] = unset,
Expand All @@ -1442,6 +1448,8 @@ def search_tests(

Search for Synthetic tests and Test Suites.

:param text: The search query.
:type text: str, optional
:param include_full_config: If true, include the full configuration for each test in the response.
:type include_full_config: bool, optional
:param search_suites: If true, returns suites instead of tests.
Expand All @@ -1457,6 +1465,9 @@ def search_tests(
:rtype: SyntheticsListTestsResponse
"""
kwargs: Dict[str, Any] = {}
if text is not unset:
kwargs["text"] = text

if include_full_config is not unset:
kwargs["include_full_config"] = include_full_config

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 @@ -5,7 +5,7 @@ interactions:
accept:
- application/json
method: GET
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
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
response:
body:
string: '{"tests":[],"total":0,"facets":[]}'
Expand Down
1 change: 1 addition & 0 deletions tests/v1/features/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