From 7ed26878daf566989da46c66504a95d70994283f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 23 Oct 2026 16:22:59 +0000 Subject: [PATCH] Regenerate client from commit 54019d3 of spec repo --- .generator/schemas/v1/openapi.yaml | 4 +- .generator/schemas/v2/openapi.yaml | 28 ++--- examples/v1/logs/ListLogs.java | 2 +- .../v2/logs-metrics/UpdateLogsMetric.java | 2 +- examples/v2/logs/ListLogs.java | 2 +- examples/v2/logs/ListLogsGet_3179484528.java | 35 ++++++ examples/v2/logs/ListLogs_2789021011.java | 42 +++++++ examples/v2/logs/ListLogs_534975433.java | 2 +- .../client/v2/model/LogsListRequestPage.java | 2 +- .../datadog/api/client/v1/api/logs.feature | 4 +- .../datadog/api/client/v2/api/logs.feature | 30 ++++- .../api/client/v2/api/logs_metrics.feature | 8 +- .../test-runner-data/manifest.json | 14 +++ ...age-limit-of-5000-returns-ok-response.json | 106 ++++++++++++++++++ ...-limit-above-1000-returns-ok-response.json | 39 +++++++ .../test-server-data/v2/logs.json | 96 ++++++++++++++++ 16 files changed, 385 insertions(+), 31 deletions(-) create mode 100644 examples/v2/logs/ListLogsGet_3179484528.java create mode 100644 examples/v2/logs/ListLogs_2789021011.java create mode 100644 src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json create mode 100644 src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e33bc05e84a..3b585fd2635 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -7896,7 +7896,7 @@ components: type: integer query: description: The search query - following the log search syntax. - example: "service:web* AND @http.status_code:[200 TO 299]" + example: "service:web-api AND @http.status_code:[200 TO 299]" type: string sort: $ref: "#/components/schemas/LogsSort" @@ -35245,7 +35245,7 @@ paths: value: index: "retention-3,retention-15" limit: 25 - query: "service:web* AND @http.status_code:[200 TO 299]" + query: "service:web-api AND @http.status_code:[200 TO 299]" sort: desc time: from: "2020-02-02T02:02:02.202Z" diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 96bcf5becc2..32db0315e36 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -76857,10 +76857,10 @@ components: type: string limit: default: 10 - description: Maximum number of logs in the response. + description: Requested maximum number of logs in the response. example: 25 format: int32 - maximum: 1000 + maximum: 5000 type: integer type: object LogsListResponse: @@ -76955,7 +76955,7 @@ components: query: default: "*" description: The search query - following the log search syntax. - example: "service:web* AND @http.status_code:[200 TO 299]" + example: "service:web-api AND @http.status_code:[200 TO 299]" type: string type: object LogsMetricGroupBy: @@ -77028,7 +77028,7 @@ components: properties: query: description: The search query - following the log search syntax. - example: "service:web* AND @http.status_code:[200 TO 299]" + example: "service:web-api AND @http.status_code:[200 TO 299]" type: string type: object LogsMetricResponseGroupBy: @@ -77117,7 +77117,7 @@ components: query: default: "*" description: The search query - following the log search syntax. - example: "service:web* AND @http.status_code:[200 TO 299]" + example: "service:web-api AND @http.status_code:[200 TO 299]" type: string storage_tier: $ref: "#/components/schemas/LogsStorageTier" @@ -197058,7 +197058,7 @@ paths: indexes: - main - web - query: service:web* AND @http.status_code:[200 TO 299] + query: service:web-api AND @http.status_code:[200 TO 299] storage_tier: indexes to: now group_by: @@ -198151,7 +198151,7 @@ paths: include_percentiles: true path: "@duration" filter: - query: "service:web* AND @http.status_code:[200 TO 299]" + query: "service:web-api AND @http.status_code:[200 TO 299]" group_by: - path: "@http.status_code" tag_name: status_code @@ -198189,7 +198189,7 @@ paths: include_percentiles: true path: "@duration" filter: - query: service:web* AND @http.status_code:[200 TO 299] + query: service:web-api AND @http.status_code:[200 TO 299] group_by: - path: "@http.status_code" tag_name: status_code @@ -198213,7 +198213,7 @@ paths: include_percentiles: true path: "@duration" filter: - query: "service:web* AND @http.status_code:[200 TO 299]" + query: "service:web-api AND @http.status_code:[200 TO 299]" group_by: - path: "@http.status_code" tag_name: status_code @@ -198279,7 +198279,7 @@ paths: include_percentiles: true path: "@duration" filter: - query: "service:web* AND @http.status_code:[200 TO 299]" + query: "service:web-api AND @http.status_code:[200 TO 299]" group_by: - path: "@http.status_code" tag_name: status_code @@ -198319,7 +198319,7 @@ paths: compute: include_percentiles: true filter: - query: service:web* AND @http.status_code:[200 TO 299] + query: service:web-api AND @http.status_code:[200 TO 299] group_by: - path: "@http.status_code" tag_name: status_code @@ -198342,7 +198342,7 @@ paths: include_percentiles: true path: "@duration" filter: - query: "service:web* AND @http.status_code:[200 TO 299]" + query: "service:web-api AND @http.status_code:[200 TO 299]" group_by: - path: "@http.status_code" tag_name: status_code @@ -199034,7 +199034,7 @@ paths: schema: default: 10 format: int32 - maximum: 1000 + maximum: 5000 type: integer responses: "200": @@ -199101,7 +199101,7 @@ paths: indexes: - main - web - query: service:web* AND @http.status_code:[200 TO 299] + query: service:web-api AND @http.status_code:[200 TO 299] storage_tier: indexes to: now options: diff --git a/examples/v1/logs/ListLogs.java b/examples/v1/logs/ListLogs.java index 4f6609628bd..66d13979165 100644 --- a/examples/v1/logs/ListLogs.java +++ b/examples/v1/logs/ListLogs.java @@ -18,7 +18,7 @@ public static void main(String[] args) { LogsListRequest body = new LogsListRequest() .index("retention-3,retention-15") - .query("service:web* AND @http.status_code:[200 TO 299]") + .query("service:web-api AND @http.status_code:[200 TO 299]") .sort(LogsSort.TIME_ASCENDING) .time( new LogsListRequestTime() diff --git a/examples/v2/logs-metrics/UpdateLogsMetric.java b/examples/v2/logs-metrics/UpdateLogsMetric.java index 189c479d3b9..b30387087d3 100644 --- a/examples/v2/logs-metrics/UpdateLogsMetric.java +++ b/examples/v2/logs-metrics/UpdateLogsMetric.java @@ -31,7 +31,7 @@ public static void main(String[] args) { .filter( new LogsMetricFilter() .query( - "service:web* AND @http.status_code:[200 TO" + "service:web-api AND @http.status_code:[200 TO" + " 299]-updated")))); try { diff --git a/examples/v2/logs/ListLogs.java b/examples/v2/logs/ListLogs.java index 6f325e524cb..37efcca3b7d 100644 --- a/examples/v2/logs/ListLogs.java +++ b/examples/v2/logs/ListLogs.java @@ -25,7 +25,7 @@ public static void main(String[] args) { new LogsQueryFilter() .from("now-15m") .indexes(Arrays.asList("main", "web")) - .query("service:web* AND @http.status_code:[200 TO 299]") + .query("service:web-api AND @http.status_code:[200 TO 299]") .storageTier(LogsStorageTier.INDEXES) .to("now")) .options(new LogsQueryOptions().timezone("GMT")) diff --git a/examples/v2/logs/ListLogsGet_3179484528.java b/examples/v2/logs/ListLogsGet_3179484528.java new file mode 100644 index 00000000000..db7a5922171 --- /dev/null +++ b/examples/v2/logs/ListLogsGet_3179484528.java @@ -0,0 +1,35 @@ +// Search logs (GET) with a page limit of 5000 returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LogsApi; +import com.datadog.api.client.v2.api.LogsApi.ListLogsGetOptionalParameters; +import com.datadog.api.client.v2.model.LogsListResponse; +import java.time.OffsetDateTime; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + LogsApi apiInstance = new LogsApi(defaultClient); + + try { + LogsListResponse result = + apiInstance.listLogsGet( + new ListLogsGetOptionalParameters() + .filterQuery("datadog-agent") + .filterIndexes(Collections.singletonList("main")) + .filterFrom(OffsetDateTime.parse("2020-09-17T11:48:36+01:00")) + .filterTo(OffsetDateTime.parse("2020-09-17T12:48:36+01:00")) + .pageLimit(5000)); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LogsApi#listLogsGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/logs/ListLogs_2789021011.java b/examples/v2/logs/ListLogs_2789021011.java new file mode 100644 index 00000000000..d9a3d8b073c --- /dev/null +++ b/examples/v2/logs/ListLogs_2789021011.java @@ -0,0 +1,42 @@ +// Search logs with a page limit above 1000 returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LogsApi; +import com.datadog.api.client.v2.api.LogsApi.ListLogsOptionalParameters; +import com.datadog.api.client.v2.model.LogsListRequest; +import com.datadog.api.client.v2.model.LogsListRequestPage; +import com.datadog.api.client.v2.model.LogsListResponse; +import com.datadog.api.client.v2.model.LogsQueryFilter; +import com.datadog.api.client.v2.model.LogsSort; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + LogsApi apiInstance = new LogsApi(defaultClient); + + LogsListRequest body = + new LogsListRequest() + .filter( + new LogsQueryFilter() + .query("datadog-agent") + .indexes(Collections.singletonList("main")) + .from("2020-09-17T11:48:36+01:00") + .to("2020-09-17T12:48:36+01:00")) + .sort(LogsSort.TIMESTAMP_ASCENDING) + .page(new LogsListRequestPage().limit(5000)); + + try { + LogsListResponse result = apiInstance.listLogs(new ListLogsOptionalParameters().body(body)); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LogsApi#listLogs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/logs/ListLogs_534975433.java b/examples/v2/logs/ListLogs_534975433.java index aacc584dccb..dfa26991237 100644 --- a/examples/v2/logs/ListLogs_534975433.java +++ b/examples/v2/logs/ListLogs_534975433.java @@ -25,7 +25,7 @@ public static void main(String[] args) { new LogsQueryFilter() .from("now-15m") .indexes(Arrays.asList("main", "web")) - .query("service:web* AND @http.status_code:[200 TO 299]") + .query("service:web-api AND @http.status_code:[200 TO 299]") .storageTier(LogsStorageTier.INDEXES) .to("now")) .options(new LogsQueryOptions().timezone("GMT")) diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java b/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java index a1c85319743..191da7ddd2e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsListRequestPage.java @@ -58,7 +58,7 @@ public LogsListRequestPage limit(Integer limit) { } /** - * Maximum number of logs in the response. maximum: 1000 + * Requested maximum number of logs in the response. maximum: 5000 * * @return limit */ diff --git a/src/test/resources/com/datadog/api/client/v1/api/logs.feature b/src/test/resources/com/datadog/api/client/v1/api/logs.feature index 5e77d38a512..2a37cdf45d1 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/logs.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/logs.feature @@ -12,7 +12,7 @@ Feature: Logs Scenario: Search logs returns "Bad Request" response Given a valid "appKeyAuth" key in the system And new "ListLogs" request - 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"}} + 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"}} When the request is sent Then the response status is 400 Bad Request @@ -20,7 +20,7 @@ Feature: Logs Scenario: Search logs returns "OK" response Given a valid "appKeyAuth" key in the system And new "ListLogs" request - 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"}} + 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"}} When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs.feature b/src/test/resources/com/datadog/api/client/v2/api/logs.feature index 067f67dad27..4c991547ec2 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/logs.feature @@ -30,7 +30,7 @@ Feature: Logs Scenario: Aggregate events returns "Bad Request" response Given a valid "appKeyAuth" key in the system And new "AggregateLogs" request - And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "group_by": [{"facet": "host", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="}} + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web-api AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "group_by": [{"facet": "host", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ=="}} When the request is sent Then the response status is 400 Bad Request @@ -86,11 +86,24 @@ Feature: Logs When the request with pagination is sent Then the response status is 200 OK + @team:ddoghq/logs-app + Scenario: Search logs (GET) with a page limit of 5000 returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListLogsGet" request + And request contains "filter[query]" parameter with value "datadog-agent" + And request contains "filter[indexes]" parameter with value ["main"] + And request contains "filter[from]" parameter with value "2020-09-17T11:48:36+01:00" + And request contains "filter[to]" parameter with value "2020-09-17T12:48:36+01:00" + And request contains "page[limit]" parameter with value 5000 + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + @generated @skip @team:ddoghq/logs-app Scenario: Search logs (POST) returns "Bad Request" response Given a valid "appKeyAuth" key in the system And new "ListLogs" request - And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web-api AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} When the request is sent Then the response status is 400 Bad Request @@ -98,7 +111,7 @@ Feature: Logs Scenario: Search logs (POST) returns "OK" response Given a valid "appKeyAuth" key in the system And new "ListLogs" request - And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web-api AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} When the request is sent Then the response status is 200 OK @@ -106,7 +119,7 @@ Feature: Logs Scenario: Search logs (POST) returns "OK" response with pagination Given a valid "appKeyAuth" key in the system And new "ListLogs" request - And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web-api AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} When the request with pagination is sent Then the response status is 200 OK @@ -128,6 +141,15 @@ Feature: Logs Then the response status is 200 OK And the response has 3 items + @team:ddoghq/logs-app + Scenario: Search logs with a page limit above 1000 returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListLogs" request + And body with value {"filter": {"query": "datadog-agent", "indexes": ["main"], "from": "2020-09-17T11:48:36+01:00", "to": "2020-09-17T12:48:36+01:00"}, "sort": "timestamp", "page": {"limit": 5000}} + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + @integration-only @skip-terraform-config @skip-validation @team:ddoghq/event-platform-intake @team:ddoghq/logs-backend @team:ddoghq/logs-federated-search @team:ddoghq/logs-routing Scenario: Send deflate logs returns "Request accepted for processing (always 202 empty JSON)." response Given new "SubmitLog" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/logs_metrics.feature index 31c072c3dfd..aca2c36292c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_metrics.feature @@ -12,14 +12,14 @@ Feature: Logs Metrics @generated @skip @team:ddoghq/logs-backend @team:ddoghq/logs-federated-search @team:ddoghq/logs-routing Scenario: Create a log-based metric returns "Bad Request" response Given new "CreateLogsMetric" request - And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "filter": {"query": "service:web* AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "id": "logs.page.load.count", "type": "logs_metrics"}} + And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "filter": {"query": "service:web-api AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "id": "logs.page.load.count", "type": "logs_metrics"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:ddoghq/logs-backend @team:ddoghq/logs-federated-search @team:ddoghq/logs-routing Scenario: Create a log-based metric returns "Conflict" response Given new "CreateLogsMetric" request - And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "filter": {"query": "service:web* AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "id": "logs.page.load.count", "type": "logs_metrics"}} + And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "filter": {"query": "service:web-api AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "id": "logs.page.load.count", "type": "logs_metrics"}} When the request is sent Then the response status is 409 Conflict @@ -77,7 +77,7 @@ Feature: Logs Metrics Scenario: Update a log-based metric returns "Bad Request" response Given new "UpdateLogsMetric" request And request contains "metric_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compute": {"include_percentiles": true}, "filter": {"query": "service:web* AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "type": "logs_metrics"}} + And body with value {"data": {"attributes": {"compute": {"include_percentiles": true}, "filter": {"query": "service:web-api AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "type": "logs_metrics"}} When the request is sent Then the response status is 400 Bad Request @@ -85,7 +85,7 @@ Feature: Logs Metrics Scenario: Update a log-based metric returns "Not Found" response Given new "UpdateLogsMetric" request And request contains "metric_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compute": {"include_percentiles": true}, "filter": {"query": "service:web* AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "type": "logs_metrics"}} + And body with value {"data": {"attributes": {"compute": {"include_percentiles": true}, "filter": {"query": "service:web-api AND @http.status_code:[200 TO 299]"}, "group_by": [{"path": "@http.status_code", "tag_name": "status_code"}]}, "type": "logs_metrics"}} When the request is sent Then the response status is 404 Not Found diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index b6576142c44..ecf5236525b 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -7028,6 +7028,13 @@ "scenario": "Get a quick list of logs returns \"OK\" response", "version": "v2" }, + { + "feature": "Logs", + "feature_file": "../../com/datadog/api/client/v2/api/logs.feature", + "file": "v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json", + "scenario": "Search logs (GET) with a page limit of 5000 returns \"OK\" response", + "version": "v2" + }, { "feature": "Logs", "feature_file": "../../com/datadog/api/client/v2/api/logs.feature", @@ -7042,6 +7049,13 @@ "scenario": "Search logs returns \"OK\" response with pagination", "version": "v2" }, + { + "feature": "Logs", + "feature_file": "../../com/datadog/api/client/v2/api/logs.feature", + "file": "v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json", + "scenario": "Search logs with a page limit above 1000 returns \"OK\" response", + "version": "v2" + }, { "feature": "Logs", "feature_file": "../../com/datadog/api/client/v2/api/logs.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json new file mode 100644 index 00000000000..a6a4fd332c3 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json @@ -0,0 +1,106 @@ +{ + "api": "Logs", + "expected_status": 200, + "feature": "Logs", + "id": "v2/Logs/Search logs (GET) with a page limit of 5000 returns \"OK\" response", + "operation_id": "ListLogsGet", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "filter[query]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "datadog-agent" + }, + "style": null + }, + { + "explode": false, + "in": "query", + "name": "filter[indexes]", + "required": false, + "schema": { + "format": null, + "items": { + "format": null, + "ref": null, + "type": "string" + }, + "ref": null, + "type": "array" + }, + "source": { + "type": "literal", + "value": [ + "main" + ] + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[from]", + "required": false, + "schema": { + "format": "date-time", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "2020-09-17T11:48:36+01:00" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[to]", + "required": false, + "schema": { + "format": "date-time", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "2020-09-17T12:48:36+01:00" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "page[limit]", + "required": false, + "schema": { + "format": "int32", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 5000 + }, + "style": null + } + ], + "path": "/api/v2/logs/events" + }, + "scenario": "Search logs (GET) with a page limit of 5000 returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json new file mode 100644 index 00000000000..ce98b583453 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json @@ -0,0 +1,39 @@ +{ + "api": "Logs", + "expected_status": 200, + "feature": "Logs", + "id": "v2/Logs/Search logs with a page limit above 1000 returns \"OK\" response", + "operation_id": "ListLogs", + "request": { + "body": { + "schema": { + "format": null, + "ref": "LogsListRequest", + "type": "object" + }, + "source": "inline", + "value": { + "filter": { + "from": "2020-09-17T11:48:36+01:00", + "indexes": [ + "main" + ], + "query": "datadog-agent", + "to": "2020-09-17T12:48:36+01:00" + }, + "page": { + "limit": 5000 + }, + "sort": "timestamp" + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/logs/events/search" + }, + "scenario": "Search logs with a page limit above 1000 returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/logs.json b/src/test/resources/generated-test/test-server-data/v2/logs.json index 7b3b1563788..7b956bb6aa4 100644 --- a/src/test/resources/generated-test/test-server-data/v2/logs.json +++ b/src/test/resources/generated-test/test-server-data/v2/logs.json @@ -299,6 +299,58 @@ "scenario": "Get a quick list of logs returns \"OK\" response", "version": "v2" }, + { + "feature": "Logs", + "frozen_at": "2026-10-23T14:37:30.525Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/logs/events", + "query": [ + [ + "filter[from]", + "2020-09-17T11:48:36+01:00" + ], + [ + "filter[indexes]", + "main" + ], + [ + "filter[query]", + "datadog-agent" + ], + [ + "filter[to]", + "2020-09-17T12:48:36+01:00" + ], + [ + "page[limit]", + "5000" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{\"elapsed\":15,\"request_id\":\"pddv1ChZnR2hvYWh3c1JHUzNNeUVPVVVObUFBIiwKHOCXKxzHqMFtzjcE7bymTTBh6cdIHOd21M44oCsSDEnIaTJ-zW3JfOOUFQ\",\"status\":\"done\"}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Search logs (GET) with a page limit of 5000 returns \"OK\" response", + "version": "v2" + }, { "feature": "Logs", "frozen_at": "2024-10-01T15:36:43.434Z", @@ -467,6 +519,50 @@ "scenario": "Search logs returns \"OK\" response with pagination", "version": "v2" }, + { + "feature": "Logs", + "frozen_at": "2026-10-20T15:48:33.672Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "filter": { + "from": "2020-09-17T11:48:36+01:00", + "indexes": [ + "main" + ], + "query": "datadog-agent", + "to": "2020-09-17T12:48:36+01:00" + }, + "page": { + "limit": 5000 + }, + "sort": "timestamp" + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/logs/events/search", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{\"elapsed\":18,\"request_id\":\"pddv1ChZBSmZLWHpjbVJSR1g3M3lROVU5a2FRIi0KHZeBL8XKykh5It8ImVi31FNZvxmHR9Mx2XFSiqL0Egyoeu2HNERQ747rLgg\",\"status\":\"done\"}}" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Search logs with a page limit above 1000 returns \"OK\" response", + "version": "v2" + }, { "feature": "Logs", "frozen_at": "2026-09-28T14:19:38.034Z",