From fdbe819575b4a351fc9667451b2a59ea6674ff68 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 23 Oct 2026 16:19:40 +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.py | 2 +- examples/v2/logs-metrics/UpdateLogsMetric.py | 2 +- examples/v2/logs/ListLogs.py | 2 +- examples/v2/logs/ListLogsGet_3179484528.py | 25 +++++ examples/v2/logs/ListLogs_2789021011.py | 34 ++++++ examples/v2/logs/ListLogs_534975433.py | 2 +- src/datadog_api_client/v2/api/logs_api.py | 2 +- .../v2/model/logs_list_request_page.py | 4 +- .../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 ++++++++++++++++ tests/v1/features/logs.feature | 4 +- tests/v2/features/logs.feature | 30 ++++- tests/v2/features/logs_metrics.feature | 8 +- 17 files changed, 369 insertions(+), 33 deletions(-) create mode 100644 examples/v2/logs/ListLogsGet_3179484528.py create mode 100644 examples/v2/logs/ListLogs_2789021011.py create mode 100644 tests/generated-test/test-runner-data/v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json create mode 100644 tests/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 e33bc05e84..3b585fd263 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 96bcf5becc..32db0315e3 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.py b/examples/v1/logs/ListLogs.py index 8f0ca621b5..2bfa282723 100644 --- a/examples/v1/logs/ListLogs.py +++ b/examples/v1/logs/ListLogs.py @@ -13,7 +13,7 @@ body = 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=LogsListRequestTime( _from=datetime(2020, 2, 2, 2, 2, 2, 202000, tzinfo=tzutc()), diff --git a/examples/v2/logs-metrics/UpdateLogsMetric.py b/examples/v2/logs-metrics/UpdateLogsMetric.py index 2ac4f78706..1b2c08616f 100644 --- a/examples/v2/logs-metrics/UpdateLogsMetric.py +++ b/examples/v2/logs-metrics/UpdateLogsMetric.py @@ -20,7 +20,7 @@ type=LogsMetricType.LOGS_METRICS, attributes=LogsMetricUpdateAttributes( filter=LogsMetricFilter( - query="service:web* AND @http.status_code:[200 TO 299]-updated", + query="service:web-api AND @http.status_code:[200 TO 299]-updated", ), ), ), diff --git a/examples/v2/logs/ListLogs.py b/examples/v2/logs/ListLogs.py index 9f01eebaf3..2d88dd5f5b 100644 --- a/examples/v2/logs/ListLogs.py +++ b/examples/v2/logs/ListLogs.py @@ -19,7 +19,7 @@ "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=LogsStorageTier.INDEXES, to="now", ), diff --git a/examples/v2/logs/ListLogsGet_3179484528.py b/examples/v2/logs/ListLogsGet_3179484528.py new file mode 100644 index 0000000000..7437136568 --- /dev/null +++ b/examples/v2/logs/ListLogsGet_3179484528.py @@ -0,0 +1,25 @@ +""" +Search logs (GET) with a page limit of 5000 returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.logs_api import LogsApi +from datetime import datetime +from dateutil.tz import tzoffset + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = LogsApi(api_client) + response = api_instance.list_logs_get( + filter_query="datadog-agent", + filter_indexes=[ + "main", + ], + filter_from=datetime(2020, 9, 17, 11, 48, 36, tzinfo=tzoffset(None, 3600)), + filter_to=datetime(2020, 9, 17, 12, 48, 36, tzinfo=tzoffset(None, 3600)), + page_limit=5000, + ) + + print(response) diff --git a/examples/v2/logs/ListLogs_2789021011.py b/examples/v2/logs/ListLogs_2789021011.py new file mode 100644 index 0000000000..cdc69ec068 --- /dev/null +++ b/examples/v2/logs/ListLogs_2789021011.py @@ -0,0 +1,34 @@ +""" +Search logs with a page limit above 1000 returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.logs_api import LogsApi +from datadog_api_client.v2.model.logs_list_request import LogsListRequest +from datadog_api_client.v2.model.logs_list_request_page import LogsListRequestPage +from datadog_api_client.v2.model.logs_query_filter import LogsQueryFilter +from datadog_api_client.v2.model.logs_sort import LogsSort + +body = LogsListRequest( + filter=LogsQueryFilter( + query="datadog-agent", + indexes=[ + "main", + ], + _from="2020-09-17T11:48:36+01:00", + to="2020-09-17T12:48:36+01:00", + ), + sort=LogsSort.TIMESTAMP_ASCENDING, + page=LogsListRequestPage( + limit=5000, + ), +) + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = LogsApi(api_client) + response = api_instance.list_logs(body=body) + + print(response) diff --git a/examples/v2/logs/ListLogs_534975433.py b/examples/v2/logs/ListLogs_534975433.py index 8156efcf1e..9af53740dd 100644 --- a/examples/v2/logs/ListLogs_534975433.py +++ b/examples/v2/logs/ListLogs_534975433.py @@ -19,7 +19,7 @@ "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=LogsStorageTier.INDEXES, to="now", ), diff --git a/src/datadog_api_client/v2/api/logs_api.py b/src/datadog_api_client/v2/api/logs_api.py index 9666308a91..5ed12aff70 100644 --- a/src/datadog_api_client/v2/api/logs_api.py +++ b/src/datadog_api_client/v2/api/logs_api.py @@ -123,7 +123,7 @@ def __init__(self, api_client=None): }, "page_limit": { "validation": { - "inclusive_maximum": 1000, + "inclusive_maximum": 5000, }, "openapi_types": (int,), "attribute": "page[limit]", diff --git a/src/datadog_api_client/v2/model/logs_list_request_page.py b/src/datadog_api_client/v2/model/logs_list_request_page.py index d06656b288..c2517d2fef 100644 --- a/src/datadog_api_client/v2/model/logs_list_request_page.py +++ b/src/datadog_api_client/v2/model/logs_list_request_page.py @@ -16,7 +16,7 @@ class LogsListRequestPage(ModelNormal): validations = { "limit": { - "inclusive_maximum": 1000, + "inclusive_maximum": 5000, }, } @@ -39,7 +39,7 @@ def __init__(self_, cursor: Union[str, UnsetType] = unset, limit: Union[int, Uns :param cursor: List following results with a cursor provided in the previous query. :type cursor: str, optional - :param limit: Maximum number of logs in the response. + :param limit: Requested maximum number of logs in the response. :type limit: int, optional """ if cursor is not unset: diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index 8131b0f6f4..87e859588b 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/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": "../../v2/features/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": "../../v2/features/logs.feature", @@ -7042,6 +7049,13 @@ "scenario": "Search logs returns \"OK\" response with pagination", "version": "v2" }, + { + "feature": "Logs", + "feature_file": "../../v2/features/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": "../../v2/features/logs.feature", diff --git a/tests/generated-test/test-runner-data/v2/logs/search-logs-get-with-a-page-limit-of-5000-returns-ok-response.json b/tests/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 0000000000..a6a4fd332c --- /dev/null +++ b/tests/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/tests/generated-test/test-runner-data/v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/logs/search-logs-with-a-page-limit-above-1000-returns-ok-response.json new file mode 100644 index 0000000000..ce98b58345 --- /dev/null +++ b/tests/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/tests/generated-test/test-server-data/v2/logs.json b/tests/generated-test/test-server-data/v2/logs.json index 7b3b156378..7b956bb6aa 100644 --- a/tests/generated-test/test-server-data/v2/logs.json +++ b/tests/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", diff --git a/tests/v1/features/logs.feature b/tests/v1/features/logs.feature index 5e77d38a51..2a37cdf45d 100644 --- a/tests/v1/features/logs.feature +++ b/tests/v1/features/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/tests/v2/features/logs.feature b/tests/v2/features/logs.feature index 067f67dad2..4c991547ec 100644 --- a/tests/v2/features/logs.feature +++ b/tests/v2/features/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/tests/v2/features/logs_metrics.feature b/tests/v2/features/logs_metrics.feature index 31c072c3df..aca2c36292 100644 --- a/tests/v2/features/logs_metrics.feature +++ b/tests/v2/features/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