Skip to content

Commit fc2c93b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 4fd1c189 of spec repo (#2673)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent cc0be3f commit fc2c93b

11 files changed

+291
-23
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-07-02 11:31:44.914188",
8-
"spec_repo_commit": "ab77d015"
7+
"regenerated": "2025-07-02 12:38:45.260947",
8+
"spec_repo_commit": "4fd1c189"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-02 11:31:44.929324",
13-
"spec_repo_commit": "ab77d015"
12+
"regenerated": "2025-07-02 12:38:45.276403",
13+
"spec_repo_commit": "4fd1c189"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 95 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33427,6 +33427,86 @@ paths:
3342733427
operator: OR
3342833428
permissions:
3342933429
- synthetics_write
33430+
/api/v1/synthetics/tests/search:
33431+
get:
33432+
description: Search for Synthetic tests and Test Suites.
33433+
operationId: SearchTests
33434+
parameters:
33435+
- description: If true, include the full configuration for each test in the
33436+
response.
33437+
in: query
33438+
name: include_full_config
33439+
required: false
33440+
schema:
33441+
type: boolean
33442+
- description: If true, returns suites instead of tests.
33443+
in: query
33444+
name: search_suites
33445+
required: false
33446+
schema:
33447+
type: boolean
33448+
- description: If true, return only facets instead of full test details.
33449+
in: query
33450+
name: facets_only
33451+
required: false
33452+
schema:
33453+
type: boolean
33454+
- description: The offset from which to start returning results.
33455+
in: query
33456+
name: start
33457+
required: false
33458+
schema:
33459+
default: 0
33460+
format: int64
33461+
type: integer
33462+
- description: The maximum number of results to return.
33463+
in: query
33464+
name: count
33465+
required: false
33466+
schema:
33467+
default: 50
33468+
format: int64
33469+
type: integer
33470+
- description: The sort order for the results (e.g., 'name,asc' or 'name,desc').
33471+
in: query
33472+
name: sort
33473+
required: false
33474+
schema:
33475+
default: name,asc
33476+
type: string
33477+
responses:
33478+
'200':
33479+
content:
33480+
application/json:
33481+
schema:
33482+
$ref: '#/components/schemas/SyntheticsListTestsResponse'
33483+
description: OK - Returns the list of Synthetic tests matching the search.
33484+
'403':
33485+
content:
33486+
application/json:
33487+
schema:
33488+
$ref: '#/components/schemas/APIErrorResponse'
33489+
description: Forbidden
33490+
'404':
33491+
content:
33492+
application/json:
33493+
schema:
33494+
$ref: '#/components/schemas/APIErrorResponse'
33495+
description: Not found
33496+
'429':
33497+
$ref: '#/components/responses/TooManyRequestsResponse'
33498+
security:
33499+
- apiKeyAuth: []
33500+
appKeyAuth: []
33501+
- AuthZ:
33502+
- synthetics_read
33503+
summary: Search Synthetic tests
33504+
tags:
33505+
- Synthetics
33506+
x-permission:
33507+
operator: OR
33508+
permissions:
33509+
- synthetics_read
3343033510
/api/v1/synthetics/tests/trigger:
3343133511
post:
3343233512
description: Trigger a set of Synthetic tests.
@@ -37222,13 +37302,21 @@ tags:
3722237302
name: Slack Integration
3722337303
- description: Take graph snapshots using the API.
3722437304
name: Snapshots
37225-
- description: "Datadog Synthetic Monitoring uses simulated user requests and browser
37226-
rendering to help you ensure uptime,\nidentify regional issues, and track your
37227-
application performance. Synthetic tests come in\ntwo different flavors, [API
37228-
tests](https://docs.datadoghq.com/synthetics/api_tests/?tab=httptest)\nand [browser
37229-
tests](https://docs.datadoghq.com/synthetics/browser_tests). You can use Datadog\u2019s
37230-
API to\nmanage both test types programmatically.\n\nFor more information, see
37231-
the [Synthetic Monitoring documentation](https://docs.datadoghq.com/synthetics/)."
37305+
- description: 'Datadog Synthetic Monitoring uses simulated user requests and browser
37306+
rendering to help you ensure uptime,
37307+
37308+
identify regional issues, and track your application performance. Synthetic tests
37309+
come in
37310+
37311+
two different flavors, [API tests](https://docs.datadoghq.com/synthetics/api_tests/?tab=httptest)
37312+
37313+
and [browser tests](https://docs.datadoghq.com/synthetics/browser_tests). You
37314+
can use Datadog''s API to
37315+
37316+
manage both test types programmatically.
37317+
37318+
37319+
For more information, see the [Synthetic Monitoring documentation](https://docs.datadoghq.com/synthetics/).'
3723237320
name: Synthetics
3723337321
- description: 'The tag endpoint allows you to assign tags to hosts,
3723437322

examples/v1/synthetics/SearchTests.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Search Synthetic tests returns "OK - Returns the list of Synthetic tests matching the search." response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SyntheticsApi(api_client)
11+
response = api_instance.search_tests()
12+
13+
print(response)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
Search Synthetic tests with boolean query parameters
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SyntheticsApi(api_client)
11+
response = api_instance.search_tests(
12+
include_full_config=True,
13+
search_suites=True,
14+
facets_only=True,
15+
start=10,
16+
count=5,
17+
sort="name,desc",
18+
)
19+
20+
print(response)

src/datadog_api_client/v1/api/synthetics_api.py

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class SyntheticsApi:
5454
Datadog Synthetic Monitoring uses simulated user requests and browser rendering to help you ensure uptime,
5555
identify regional issues, and track your application performance. Synthetic tests come in
5656
two different flavors, `API tests <https://docs.datadoghq.com/synthetics/api_tests/?tab=httptest>`_
57-
and `browser tests <https://docs.datadoghq.com/synthetics/browser_tests>`_. You can use Datadogs API to
57+
and `browser tests <https://docs.datadoghq.com/synthetics/browser_tests>`_. You can use Datadog's API to
5858
manage both test types programmatically.
5959
6060
For more information, see the `Synthetic Monitoring documentation <https://docs.datadoghq.com/synthetics/>`_.
@@ -675,6 +675,53 @@ def __init__(self, api_client=None):
675675
api_client=api_client,
676676
)
677677

678+
self._search_tests_endpoint = _Endpoint(
679+
settings={
680+
"response_type": (SyntheticsListTestsResponse,),
681+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
682+
"endpoint_path": "/api/v1/synthetics/tests/search",
683+
"operation_id": "search_tests",
684+
"http_method": "GET",
685+
"version": "v1",
686+
},
687+
params_map={
688+
"include_full_config": {
689+
"openapi_types": (bool,),
690+
"attribute": "include_full_config",
691+
"location": "query",
692+
},
693+
"search_suites": {
694+
"openapi_types": (bool,),
695+
"attribute": "search_suites",
696+
"location": "query",
697+
},
698+
"facets_only": {
699+
"openapi_types": (bool,),
700+
"attribute": "facets_only",
701+
"location": "query",
702+
},
703+
"start": {
704+
"openapi_types": (int,),
705+
"attribute": "start",
706+
"location": "query",
707+
},
708+
"count": {
709+
"openapi_types": (int,),
710+
"attribute": "count",
711+
"location": "query",
712+
},
713+
"sort": {
714+
"openapi_types": (str,),
715+
"attribute": "sort",
716+
"location": "query",
717+
},
718+
},
719+
headers_map={
720+
"accept": ["application/json"],
721+
},
722+
api_client=api_client,
723+
)
724+
678725
self._trigger_ci_tests_endpoint = _Endpoint(
679726
settings={
680727
"response_type": (SyntheticsTriggerCITestsResponse,),
@@ -1381,6 +1428,55 @@ def patch_test(
13811428

13821429
return self._patch_test_endpoint.call_with_http_info(**kwargs)
13831430

1431+
def search_tests(
1432+
self,
1433+
*,
1434+
include_full_config: Union[bool, UnsetType] = unset,
1435+
search_suites: Union[bool, UnsetType] = unset,
1436+
facets_only: Union[bool, UnsetType] = unset,
1437+
start: Union[int, UnsetType] = unset,
1438+
count: Union[int, UnsetType] = unset,
1439+
sort: Union[str, UnsetType] = unset,
1440+
) -> SyntheticsListTestsResponse:
1441+
"""Search Synthetic tests.
1442+
1443+
Search for Synthetic tests and Test Suites.
1444+
1445+
:param include_full_config: If true, include the full configuration for each test in the response.
1446+
:type include_full_config: bool, optional
1447+
:param search_suites: If true, returns suites instead of tests.
1448+
:type search_suites: bool, optional
1449+
:param facets_only: If true, return only facets instead of full test details.
1450+
:type facets_only: bool, optional
1451+
:param start: The offset from which to start returning results.
1452+
:type start: int, optional
1453+
:param count: The maximum number of results to return.
1454+
:type count: int, optional
1455+
:param sort: The sort order for the results (e.g., 'name,asc' or 'name,desc').
1456+
:type sort: str, optional
1457+
:rtype: SyntheticsListTestsResponse
1458+
"""
1459+
kwargs: Dict[str, Any] = {}
1460+
if include_full_config is not unset:
1461+
kwargs["include_full_config"] = include_full_config
1462+
1463+
if search_suites is not unset:
1464+
kwargs["search_suites"] = search_suites
1465+
1466+
if facets_only is not unset:
1467+
kwargs["facets_only"] = facets_only
1468+
1469+
if start is not unset:
1470+
kwargs["start"] = start
1471+
1472+
if count is not unset:
1473+
kwargs["count"] = count
1474+
1475+
if sort is not unset:
1476+
kwargs["sort"] = sort
1477+
1478+
return self._search_tests_endpoint.call_with_http_info(**kwargs)
1479+
13841480
def trigger_ci_tests(
13851481
self,
13861482
body: SyntheticsCITestBody,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-07-01T15:52:56.329Z
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
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
9+
response:
10+
body:
11+
string: '{"tests":[],"total":0,"facets":[]}'
12+
headers:
13+
content-type:
14+
- application/json
15+
status:
16+
code: 200
17+
message: OK
18+
version: 1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-09T11:18:22.632Z
1+
2025-07-01T15:52:56.929Z

0 commit comments

Comments
 (0)