Skip to content

Commit 057e520

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8f58960 of spec repo
1 parent 193c886 commit 057e520

16 files changed

Lines changed: 385 additions & 31 deletions

File tree

‎.generator/schemas/v1/openapi.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7896,7 +7896,7 @@ components:
78967896
type: integer
78977897
query:
78987898
description: The search query - following the log search syntax.
7899-
example: "service:web* AND @http.status_code:[200 TO 299]"
7899+
example: "service:web-api AND @http.status_code:[200 TO 299]"
79007900
type: string
79017901
sort:
79027902
$ref: "#/components/schemas/LogsSort"
@@ -35245,7 +35245,7 @@ paths:
3524535245
value:
3524635246
index: "retention-3,retention-15"
3524735247
limit: 25
35248-
query: "service:web* AND @http.status_code:[200 TO 299]"
35248+
query: "service:web-api AND @http.status_code:[200 TO 299]"
3524935249
sort: desc
3525035250
time:
3525135251
from: "2020-02-02T02:02:02.202Z"

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76857,10 +76857,10 @@ components:
7685776857
type: string
7685876858
limit:
7685976859
default: 10
76860-
description: Maximum number of logs in the response.
76860+
description: Requested maximum number of logs in the response.
7686176861
example: 25
7686276862
format: int32
76863-
maximum: 1000
76863+
maximum: 5000
7686476864
type: integer
7686576865
type: object
7686676866
LogsListResponse:
@@ -76955,7 +76955,7 @@ components:
7695576955
query:
7695676956
default: "*"
7695776957
description: The search query - following the log search syntax.
76958-
example: "service:web* AND @http.status_code:[200 TO 299]"
76958+
example: "service:web-api AND @http.status_code:[200 TO 299]"
7695976959
type: string
7696076960
type: object
7696176961
LogsMetricGroupBy:
@@ -77028,7 +77028,7 @@ components:
7702877028
properties:
7702977029
query:
7703077030
description: The search query - following the log search syntax.
77031-
example: "service:web* AND @http.status_code:[200 TO 299]"
77031+
example: "service:web-api AND @http.status_code:[200 TO 299]"
7703277032
type: string
7703377033
type: object
7703477034
LogsMetricResponseGroupBy:
@@ -77117,7 +77117,7 @@ components:
7711777117
query:
7711877118
default: "*"
7711977119
description: The search query - following the log search syntax.
77120-
example: "service:web* AND @http.status_code:[200 TO 299]"
77120+
example: "service:web-api AND @http.status_code:[200 TO 299]"
7712177121
type: string
7712277122
storage_tier:
7712377123
$ref: "#/components/schemas/LogsStorageTier"
@@ -197058,7 +197058,7 @@ paths:
197058197058
indexes:
197059197059
- main
197060197060
- web
197061-
query: service:web* AND @http.status_code:[200 TO 299]
197061+
query: service:web-api AND @http.status_code:[200 TO 299]
197062197062
storage_tier: indexes
197063197063
to: now
197064197064
group_by:
@@ -198151,7 +198151,7 @@ paths:
198151198151
include_percentiles: true
198152198152
path: "@duration"
198153198153
filter:
198154-
query: "service:web* AND @http.status_code:[200 TO 299]"
198154+
query: "service:web-api AND @http.status_code:[200 TO 299]"
198155198155
group_by:
198156198156
- path: "@http.status_code"
198157198157
tag_name: status_code
@@ -198189,7 +198189,7 @@ paths:
198189198189
include_percentiles: true
198190198190
path: "@duration"
198191198191
filter:
198192-
query: service:web* AND @http.status_code:[200 TO 299]
198192+
query: service:web-api AND @http.status_code:[200 TO 299]
198193198193
group_by:
198194198194
- path: "@http.status_code"
198195198195
tag_name: status_code
@@ -198213,7 +198213,7 @@ paths:
198213198213
include_percentiles: true
198214198214
path: "@duration"
198215198215
filter:
198216-
query: "service:web* AND @http.status_code:[200 TO 299]"
198216+
query: "service:web-api AND @http.status_code:[200 TO 299]"
198217198217
group_by:
198218198218
- path: "@http.status_code"
198219198219
tag_name: status_code
@@ -198279,7 +198279,7 @@ paths:
198279198279
include_percentiles: true
198280198280
path: "@duration"
198281198281
filter:
198282-
query: "service:web* AND @http.status_code:[200 TO 299]"
198282+
query: "service:web-api AND @http.status_code:[200 TO 299]"
198283198283
group_by:
198284198284
- path: "@http.status_code"
198285198285
tag_name: status_code
@@ -198319,7 +198319,7 @@ paths:
198319198319
compute:
198320198320
include_percentiles: true
198321198321
filter:
198322-
query: service:web* AND @http.status_code:[200 TO 299]
198322+
query: service:web-api AND @http.status_code:[200 TO 299]
198323198323
group_by:
198324198324
- path: "@http.status_code"
198325198325
tag_name: status_code
@@ -198342,7 +198342,7 @@ paths:
198342198342
include_percentiles: true
198343198343
path: "@duration"
198344198344
filter:
198345-
query: "service:web* AND @http.status_code:[200 TO 299]"
198345+
query: "service:web-api AND @http.status_code:[200 TO 299]"
198346198346
group_by:
198347198347
- path: "@http.status_code"
198348198348
tag_name: status_code
@@ -199034,7 +199034,7 @@ paths:
199034199034
schema:
199035199035
default: 10
199036199036
format: int32
199037-
maximum: 1000
199037+
maximum: 5000
199038199038
type: integer
199039199039
responses:
199040199040
"200":
@@ -199101,7 +199101,7 @@ paths:
199101199101
indexes:
199102199102
- main
199103199103
- web
199104-
query: service:web* AND @http.status_code:[200 TO 299]
199104+
query: service:web-api AND @http.status_code:[200 TO 299]
199105199105
storage_tier: indexes
199106199106
to: now
199107199107
options:

‎examples/v1/logs/ListLogs.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void main(String[] args) {
1818
LogsListRequest body =
1919
new LogsListRequest()
2020
.index("retention-3,retention-15")
21-
.query("service:web* AND @http.status_code:[200 TO 299]")
21+
.query("service:web-api AND @http.status_code:[200 TO 299]")
2222
.sort(LogsSort.TIME_ASCENDING)
2323
.time(
2424
new LogsListRequestTime()

‎examples/v2/logs-metrics/UpdateLogsMetric.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static void main(String[] args) {
3131
.filter(
3232
new LogsMetricFilter()
3333
.query(
34-
"service:web* AND @http.status_code:[200 TO"
34+
"service:web-api AND @http.status_code:[200 TO"
3535
+ " 299]-updated"))));
3636

3737
try {

‎examples/v2/logs/ListLogs.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void main(String[] args) {
2525
new LogsQueryFilter()
2626
.from("now-15m")
2727
.indexes(Arrays.asList("main", "web"))
28-
.query("service:web* AND @http.status_code:[200 TO 299]")
28+
.query("service:web-api AND @http.status_code:[200 TO 299]")
2929
.storageTier(LogsStorageTier.INDEXES)
3030
.to("now"))
3131
.options(new LogsQueryOptions().timezone("GMT"))
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Search logs (GET) with a page limit of 5000 returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LogsApi;
6+
import com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters;
7+
import com.datadog.api.client.v2.model.LogsListResponse;
8+
import java.time.OffsetDateTime;
9+
import java.util.Collections;
10+
11+
public class Example {
12+
public static void main(String[] args) {
13+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
14+
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
15+
LogsApi apiInstance = new LogsApi(defaultClient);
16+
17+
try {
18+
LogsListResponse result =
19+
apiInstance.listLogsGet(
20+
new ListLogsGetOptionalParameters()
21+
.filterQuery("datadog-agent")
22+
.filterIndexes(Collections.singletonList("main"))
23+
.filterFrom(OffsetDateTime.parse("2020-09-17T11:48:36+01:00"))
24+
.filterTo(OffsetDateTime.parse("2020-09-17T12:48:36+01:00"))
25+
.pageLimit(5000));
26+
System.out.println(result);
27+
} catch (ApiException e) {
28+
System.err.println("Exception when calling LogsApi#listLogsGet");
29+
System.err.println("Status code: " + e.getCode());
30+
System.err.println("Reason: " + e.getResponseBody());
31+
System.err.println("Response headers: " + e.getResponseHeaders());
32+
e.printStackTrace();
33+
}
34+
}
35+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Search logs with a page limit above 1000 returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LogsApi;
6+
import com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters;
7+
import com.datadog.api.client.v2.model.LogsListRequest;
8+
import com.datadog.api.client.v2.model.LogsListRequestPage;
9+
import com.datadog.api.client.v2.model.LogsListResponse;
10+
import com.datadog.api.client.v2.model.LogsQueryFilter;
11+
import com.datadog.api.client.v2.model.LogsSort;
12+
import java.util.Collections;
13+
14+
public class Example {
15+
public static void main(String[] args) {
16+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
17+
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
18+
LogsApi apiInstance = new LogsApi(defaultClient);
19+
20+
LogsListRequest body =
21+
new LogsListRequest()
22+
.filter(
23+
new LogsQueryFilter()
24+
.query("datadog-agent")
25+
.indexes(Collections.singletonList("main"))
26+
.from("2020-09-17T11:48:36+01:00")
27+
.to("2020-09-17T12:48:36+01:00"))
28+
.sort(LogsSort.TIMESTAMP_ASCENDING)
29+
.page(new LogsListRequestPage().limit(5000));
30+
31+
try {
32+
LogsListResponse result = apiInstance.listLogs(new ListLogsOptionalParameters().body(body));
33+
System.out.println(result);
34+
} catch (ApiException e) {
35+
System.err.println("Exception when calling LogsApi#listLogs");
36+
System.err.println("Status code: " + e.getCode());
37+
System.err.println("Reason: " + e.getResponseBody());
38+
System.err.println("Response headers: " + e.getResponseHeaders());
39+
e.printStackTrace();
40+
}
41+
}
42+
}

‎examples/v2/logs/ListLogs_534975433.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void main(String[] args) {
2525
new LogsQueryFilter()
2626
.from("now-15m")
2727
.indexes(Arrays.asList("main", "web"))
28-
.query("service:web* AND @http.status_code:[200 TO 299]")
28+
.query("service:web-api AND @http.status_code:[200 TO 299]")
2929
.storageTier(LogsStorageTier.INDEXES)
3030
.to("now"))
3131
.options(new LogsQueryOptions().timezone("GMT"))

‎src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public LogsListRequestPage limit(Integer limit) {
5858
}
5959

6060
/**
61-
* Maximum number of logs in the response. maximum: 1000
61+
* Requested maximum number of logs in the response. maximum: 5000
6262
*
6363
* @return limit
6464
*/

‎src/test/resources/com/datadog/api/client/v1/api/logs.feature‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Feature: Logs
1212
Scenario: Search logs returns "Bad Request" response
1313
Given a valid "appKeyAuth" key in the system
1414
And new "ListLogs" request
15-
And body with value {"index": "retention-3,retention-15", "query": "service:web* AND @http.status_code:[200 TO 299]", "sort": "asc", "time": {"from": "2020-02-02T02:02:02.202Z", "to": "2020-02-20T02:02:02.202Z"}}
15+
And body with value {"index": "retention-3,retention-15", "query": "service:web-api AND @http.status_code:[200 TO 299]", "sort": "asc", "time": {"from": "2020-02-02T02:02:02.202Z", "to": "2020-02-20T02:02:02.202Z"}}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@generated @skip @team:ddoghq/logs-app
2020
Scenario: Search logs returns "OK" response
2121
Given a valid "appKeyAuth" key in the system
2222
And new "ListLogs" request
23-
And body with value {"index": "retention-3,retention-15", "query": "service:web* AND @http.status_code:[200 TO 299]", "sort": "asc", "time": {"from": "2020-02-02T02:02:02.202Z", "to": "2020-02-20T02:02:02.202Z"}}
23+
And body with value {"index": "retention-3,retention-15", "query": "service:web-api AND @http.status_code:[200 TO 299]", "sort": "asc", "time": {"from": "2020-02-02T02:02:02.202Z", "to": "2020-02-20T02:02:02.202Z"}}
2424
When the request is sent
2525
Then the response status is 200 OK
2626

0 commit comments

Comments
 (0)