Skip to content

Commit 0b522f4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adds missing /api/v1/synthetics/tests/search spec (#764)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c8688ba commit 0b522f4

12 files changed

+469
-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:49.454539",
8-
"spec_repo_commit": "ab77d015"
7+
"regenerated": "2025-07-02 12:38:40.410886",
8+
"spec_repo_commit": "4fd1c189"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-02 11:31:49.470372",
13-
"spec_repo_commit": "ab77d015"
12+
"regenerated": "2025-07-02 12:38:40.427530",
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.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Search Synthetic tests returns "OK - Returns the list of Synthetic tests
2+
// matching the search." response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV1::api_synthetics::SearchTestsOptionalParams;
5+
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
6+
7+
#[tokio::main]
8+
async fn main() {
9+
let configuration = datadog::Configuration::new();
10+
let api = SyntheticsAPI::with_config(configuration);
11+
let resp = api.search_tests(SearchTestsOptionalParams::default()).await;
12+
if let Ok(value) = resp {
13+
println!("{:#?}", value);
14+
} else {
15+
println!("{:#?}", resp.unwrap_err());
16+
}
17+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Search Synthetic tests with boolean query parameters
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV1::api_synthetics::SearchTestsOptionalParams;
4+
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = SyntheticsAPI::with_config(configuration);
10+
let resp = api
11+
.search_tests(
12+
SearchTestsOptionalParams::default()
13+
.include_full_config(true)
14+
.search_suites(true)
15+
.facets_only(true)
16+
.start(10)
17+
.count(5)
18+
.sort("name,desc".to_string()),
19+
)
20+
.await;
21+
if let Ok(value) = resp {
22+
println!("{:#?}", value);
23+
} else {
24+
println!("{:#?}", resp.unwrap_err());
25+
}
26+
}

0 commit comments

Comments
 (0)