-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathSearchTests_195957771.java
More file actions
34 lines (31 loc) · 1.27 KB
/
SearchTests_195957771.java
File metadata and controls
34 lines (31 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Search Synthetic tests with boolean query parameters
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.api.SyntheticsApi.SearchTestsOptionalParameters;
import com.datadog.api.client.v1.model.SyntheticsListTestsResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);
try {
SyntheticsListTestsResponse result =
apiInstance.searchTests(
new SearchTestsOptionalParameters()
.text("tag:value")
.includeFullConfig(true)
.searchSuites(true)
.facetsOnly(true)
.start(10L)
.count(5L)
.sort("name,desc"));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SyntheticsApi#searchTests");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}