From 34f70fde2fedeeb9cb530921fcfd055b77701912 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 25 Mar 2026 23:23:34 +0000 Subject: [PATCH] Regenerate client from commit 95ee0a0 of spec repo --- .generator/schemas/v2/openapi.yaml | 1 + .../frozen.json | 1 + .../recording.har | 124 ++++++++++++++++++ .../case-management/SearchCases_3433960044.ts | 7 +- features/v2/case_management.feature | 5 +- .../apis/CaseManagementApi.ts | 2 +- 6 files changed, 137 insertions(+), 3 deletions(-) create mode 100644 cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/frozen.json create mode 100644 cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/recording.har diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 338a55710a52..4613e9536254 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -75976,6 +75976,7 @@ paths: x-pagination: limitParam: page[size] pageParam: page[number] + pageStart: 1 resultsPath: data post: description: Create a Case diff --git a/cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/frozen.json b/cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/frozen.json new file mode 100644 index 000000000000..79b43dbcd1dd --- /dev/null +++ b/cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/frozen.json @@ -0,0 +1 @@ +"2026-03-25T10:29:24.893Z" diff --git a/cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/recording.har b/cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/recording.har new file mode 100644 index 000000000000..7d29ff8de245 --- /dev/null +++ b/cassettes/v2/Case-Management_2486725080/Search-cases-returns-OK-response-with-pagination_2589664246/recording.har @@ -0,0 +1,124 @@ +{ + "log": { + "_recordingName": "Case Management/Search cases returns \"OK\" response with pagination", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a97b8b378352cdc6fbd499ef00afc3f6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "page", + "value": { + "number": "1", + "size": "2" + } + }, + { + "name": "filter", + "value": "status:closed" + } + ], + "url": "https://api.datadoghq.com/api/v2/cases?page%5Bsize%5D=2&page%5Bnumber%5D=1&filter=status%3Aclosed" + }, + "response": { + "bodySize": 3222, + "content": { + "mimeType": "application/vnd.api+json", + "size": 3222, + "text": "{\"data\":[{\"id\":\"cd4abeaa-0a5b-4b83-b99c-5b6d1f912938\",\"type\":\"case\",\"attributes\":{\"attributes\":{\"service\":[\"synthetics-browser\"]},\"closed_at\":\"2026-01-24T00:47:45.477244496Z\",\"comment_count\":0,\"created_at\":\"2025-11-12T00:42:59.178125Z\",\"created_by_author\":{\"type\":\"USER\",\"content\":{\"ID\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"active\":true}},\"creation_source\":\"ERROR_TRACKING\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[{\"type\":\"ERROR_TRACKING\",\"ref\":\"/error-tracking?issueId=a5bb2896-a4d0-11f0-bd76-da7ad0900002\",\"resource_id\":\"a5bb2896-a4d0-11f0-bd76-da7ad0900002\"}],\"internal_id\":\"cd4abeaa-0a5b-4b83-b99c-5b6d1f912938\",\"key\":\"ET-3\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2026-02-05T03:58:14.876711989Z\",\"priority\":\"NOT_DEFINED\",\"public_id\":\"89979\",\"status\":\"CLOSED\",\"status_group\":\"SG_CLOSED\",\"status_name\":\"Closed\",\"title\":\"require-trusted-types-for: csp_violation: 'trusted-types-sink' blocked by 'require-trusted-types-for' directive\",\"type\":\"ERROR_TRACKING_ISSUE\",\"type_id\":\"00000000-0000-0000-0000-000000000005\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"384521ba-dc5f-481f-942d-15bd48428029\",\"type\":\"project\"}}}},{\"id\":\"7afc10c8-4096-4af1-9ccf-ec0df3a2f63b\",\"type\":\"case\",\"attributes\":{\"attributes\":{\"service\":[\"synthetics-browser\"]},\"comment_count\":0,\"created_at\":\"2025-09-02T13:56:48.031226Z\",\"created_by_author\":{\"type\":\"USER\",\"content\":{\"ID\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"frog\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"active\":true}},\"creation_source\":\"ERROR_TRACKING\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[{\"type\":\"ERROR_TRACKING\",\"ref\":\"/error-tracking?issueId=d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"resource_id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\"}],\"internal_id\":\"7afc10c8-4096-4af1-9ccf-ec0df3a2f63b\",\"key\":\"ET-2\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2026-03-25T09:56:47.052997427Z\",\"priority\":\"NOT_DEFINED\",\"public_id\":\"79361\",\"status\":\"CLOSED\",\"status_group\":\"SG_CLOSED\",\"status_name\":\"Closed\",\"title\":\"Error: Expected unhandled error\",\"type\":\"ERROR_TRACKING_ISSUE\",\"type_id\":\"00000000-0000-0000-0000-000000000005\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"384521ba-dc5f-481f-942d-15bd48428029\",\"type\":\"project\"}}}}],\"meta\":{\"total_cases\":3,\"page\":{\"current\":1,\"size\":2,\"total\":2}},\"included\":[{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\",\"attributes\":{\"active\":false,\"email\":\"\",\"handle\":\"\",\"name\":\"\"}},{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}},{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-25T10:29:24.899Z", + "time": 150 + }, + { + "_id": "e440eea8a78521a716743ebcab9e6db0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 556, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "page", + "value": { + "number": "2", + "size": "2" + } + }, + { + "name": "filter", + "value": "status:closed" + } + ], + "url": "https://api.datadoghq.com/api/v2/cases?page%5Bsize%5D=2&page%5Bnumber%5D=2&filter=status%3Aclosed" + }, + "response": { + "bodySize": 1640, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1640, + "text": "{\"data\":[{\"id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"type\":\"case\",\"attributes\":{\"attributes\":{\"service\":[\"synthetics-browser\"]},\"closed_at\":\"2025-08-21T17:21:13.882830862Z\",\"comment_count\":0,\"created_at\":\"2025-08-21T17:20:22.807979Z\",\"created_by_author\":{\"type\":\"USER\",\"content\":{\"ID\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"frog\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"active\":true}},\"creation_source\":\"ERROR_TRACKING\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[{\"type\":\"ERROR_TRACKING\",\"ref\":\"/error-tracking?issueId=5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"resource_id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\"}],\"internal_id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"key\":\"ET-1\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-08-21T17:21:13.882830862Z\",\"priority\":\"NOT_DEFINED\",\"public_id\":\"77795\",\"status\":\"CLOSED\",\"status_group\":\"SG_CLOSED\",\"status_name\":\"Closed\",\"title\":\"Error: HTTP error\",\"type\":\"ERROR_TRACKING_ISSUE\",\"type_id\":\"00000000-0000-0000-0000-000000000005\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"384521ba-dc5f-481f-942d-15bd48428029\",\"type\":\"project\"}}}}],\"meta\":{\"total_cases\":3,\"page\":{\"current\":2,\"size\":1,\"total\":2}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}},{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\",\"attributes\":{\"active\":false,\"email\":\"\",\"handle\":\"\",\"name\":\"\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 665, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-25T10:29:25.055Z", + "time": 131 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/case-management/SearchCases_3433960044.ts b/examples/v2/case-management/SearchCases_3433960044.ts index d73cef958bb5..5b506223e373 100644 --- a/examples/v2/case-management/SearchCases_3433960044.ts +++ b/examples/v2/case-management/SearchCases_3433960044.ts @@ -7,9 +7,14 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); const apiInstance = new v2.CaseManagementApi(configuration); +const params: v2.CaseManagementApiSearchCasesRequest = { + pageSize: 2, + filter: "status:closed", +}; + (async () => { try { - for await (const item of apiInstance.searchCasesWithPagination()) { + for await (const item of apiInstance.searchCasesWithPagination(params)) { console.log(item); } } catch (error) { diff --git a/features/v2/case_management.feature b/features/v2/case_management.feature index 56d8f9ed68ed..bd67a8ddf2cc 100644 --- a/features/v2/case_management.feature +++ b/features/v2/case_management.feature @@ -508,11 +508,14 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management @with-pagination + @replay-only @skip-validation @team:DataDog/case-management @with-pagination Scenario: Search cases returns "OK" response with pagination Given new "SearchCases" request + And request contains "page[size]" parameter with value 2 + And request contains "filter" parameter with value "status:closed" When the request with pagination is sent Then the response status is 200 OK + And the response has 3 items @team:DataDog/case-management Scenario: Unarchive case returns "Bad Request" response diff --git a/packages/datadog-api-client-v2/apis/CaseManagementApi.ts b/packages/datadog-api-client-v2/apis/CaseManagementApi.ts index 340c21dcae29..f3f96aeb44c4 100644 --- a/packages/datadog-api-client-v2/apis/CaseManagementApi.ts +++ b/packages/datadog-api-client-v2/apis/CaseManagementApi.ts @@ -4585,7 +4585,7 @@ export class CaseManagementApi { pageSize = param.pageSize; } param.pageSize = pageSize; - param.pageNumber = 0; + param.pageNumber = 1; while (true) { const requestContext = await this.requestFactory.searchCases( param.pageSize,