From b708469b37fb154760c41d7749c8bb57ffaf48ee Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 4 Dec 2025 08:19:03 +0000 Subject: [PATCH] Regenerate client from commit 5860386 of spec repo --- .generator/schemas/v2/openapi.yaml | 10 +- .../frozen.json | 1 - .../recording.har | 237 ------------------ examples/v2/on-call/GetScheduleOnCallUser.ts | 2 +- features/v2/on-call.feature | 44 ++-- 5 files changed, 32 insertions(+), 262 deletions(-) delete mode 100644 cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/frozen.json delete mode 100644 cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/recording.har diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bdfd0743160..4b5678d0bcf0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -74529,9 +74529,13 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get the schedule on-call user + summary: Get scheduled on-call user tags: - On-Call + x-permission: + operator: AND + permissions: + - on_call_read /api/v2/on-call/teams/{team_id}/on-call: get: description: Get a team's on-call users at a given time @@ -74574,6 +74578,10 @@ paths: summary: Get team on-call users tags: - On-Call + x-permission: + operator: AND + permissions: + - on_call_read /api/v2/on-call/teams/{team_id}/routing-rules: get: description: Get a team's On-Call routing rules diff --git a/cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/frozen.json b/cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/frozen.json deleted file mode 100644 index 7671b38f8dce..000000000000 --- a/cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/frozen.json +++ /dev/null @@ -1 +0,0 @@ -"2025-11-27T14:11:47.631Z" diff --git a/cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/recording.har b/cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/recording.har deleted file mode 100644 index 198fc49832ea..000000000000 --- a/cassettes/v2/On-Call_446749911/Get-the-schedule-on-call-user-returns-OK-response_4196899322/recording.har +++ /dev/null @@ -1,237 +0,0 @@ -{ - "log": { - "_recordingName": "On-Call/Get the schedule on-call user returns \"OK\" response", - "creator": { - "comment": "persister:fs", - "name": "Polly.JS", - "version": "6.0.5" - }, - "entries": [ - { - "_id": "f2592e5f27684cf1127ffb6994dbb296", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 151, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "application/json" - }, - { - "_fromType": "array", - "name": "content-type", - "value": "application/json" - } - ], - "headersSize": 550, - "httpVersion": "HTTP/1.1", - "method": "POST", - "postData": { - "mimeType": "application/json", - "params": [], - "text": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" - }, - "queryString": [], - "url": "https://api.datadoghq.com/api/v2/users" - }, - "response": { - "bodySize": 726, - "content": { - "mimeType": "application/json", - "size": 726, - "text": "{\"data\":{\"type\":\"users\",\"id\":\"030e767a-cb9b-11f0-8fcd-5ac0b02adf59\",\"attributes\":{\"name\":null,\"handle\":\"test-get_the_schedule_on_call_user_returns_ok_response-1764252707@datadoghq.com\",\"created_at\":\"2025-11-27T14:11:48.013486+00:00\",\"modified_at\":\"2025-11-27T14:11:48.013486+00:00\",\"email\":\"test-get_the_schedule_on_call_user_returns_ok_response-1764252707@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/a9e8940d153698e24c0b29024875d46f?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" - }, - "cookies": [], - "headers": [ - { - "name": "content-type", - "value": "application/json" - } - ], - "headersSize": 681, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 201, - "statusText": "Created" - }, - "startedDateTime": "2025-11-27T14:11:47.635Z", - "time": 469 - }, - { - "_id": "5dfe96b65e236697ab1126519ef0bf70", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 598, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "application/json" - }, - { - "_fromType": "array", - "name": "content-type", - "value": "application/json" - } - ], - "headersSize": 572, - "httpVersion": "HTTP/1.1", - "method": "POST", - "postData": { - "mimeType": "application/json", - "params": [], - "text": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-11-17T14:11:47.631Z\",\"end_date\":\"2025-12-07T14:11:47.631Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"030e767a-cb9b-11f0-8fcd-5ac0b02adf59\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-11-22T14:11:47.631Z\"}],\"name\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" - }, - "queryString": [], - "url": "https://api.datadoghq.com/api/v2/on-call/schedules" - }, - "response": { - "bodySize": 374, - "content": { - "mimeType": "application/vnd.api+json", - "size": 374, - "text": "{\"data\":{\"id\":\"93a33505-71dc-4be4-a55d-95eb23b6b400\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"c9addf6a-059c-4b07-aced-a2c287fd969f\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}" - }, - "cookies": [], - "headers": [ - { - "name": "content-type", - "value": "application/vnd.api+json" - } - ], - "headersSize": 525, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 201, - "statusText": "Created" - }, - "startedDateTime": "2025-11-27T14:11:48.111Z", - "time": 440 - }, - { - "_id": "39e441da955dc16cd1e693330774196f", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 0, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "application/json" - } - ], - "headersSize": 564, - "httpVersion": "HTTP/1.1", - "method": "GET", - "queryString": [], - "url": "https://api.datadoghq.com/api/v2/on-call/schedules/93a33505-71dc-4be4-a55d-95eb23b6b400/on-call" - }, - "response": { - "bodySize": 308, - "content": { - "mimeType": "application/vnd.api+json", - "size": 308, - "text": "{\"data\":{\"id\":\"030e767a-cb9b-11f0-8fcd-5ac0b02adf59-2025-11-27T09:11:48-05:00-2025-11-28T09:11:47-05:00\",\"type\":\"shifts\",\"attributes\":{\"end\":\"2025-11-28T09:11:47-05:00\",\"start\":\"2025-11-27T09:11:48.47496-05:00\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"030e767a-cb9b-11f0-8fcd-5ac0b02adf59\",\"type\":\"users\"}}}}}" - }, - "cookies": [], - "headers": [ - { - "name": "content-type", - "value": "application/vnd.api+json" - } - ], - "headersSize": 525, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 200, - "statusText": "OK" - }, - "startedDateTime": "2025-11-27T14:11:48.560Z", - "time": 389 - }, - { - "_id": "0d43106dea02c4f7744b6acdce88d57a", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 0, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "*/*" - } - ], - "headersSize": 545, - "httpVersion": "HTTP/1.1", - "method": "DELETE", - "queryString": [], - "url": "https://api.datadoghq.com/api/v2/on-call/schedules/93a33505-71dc-4be4-a55d-95eb23b6b400" - }, - "response": { - "bodySize": 0, - "content": { - "mimeType": "text/plain", - "size": 0 - }, - "cookies": [], - "headers": [], - "headersSize": 464, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 204, - "statusText": "No Content" - }, - "startedDateTime": "2025-11-27T14:11:48.958Z", - "time": 427 - }, - { - "_id": "818bd98d114a84cedad8501f35d2e638", - "_order": 0, - "cache": {}, - "request": { - "bodySize": 0, - "cookies": [], - "headers": [ - { - "_fromType": "array", - "name": "accept", - "value": "*/*" - } - ], - "headersSize": 524, - "httpVersion": "HTTP/1.1", - "method": "DELETE", - "queryString": [], - "url": "https://api.datadoghq.com/api/v2/users/030e767a-cb9b-11f0-8fcd-5ac0b02adf59" - }, - "response": { - "bodySize": 0, - "content": { - "mimeType": "text/plain", - "size": 0 - }, - "cookies": [], - "headers": [], - "headersSize": 495, - "httpVersion": "HTTP/1.1", - "redirectURL": "", - "status": 204, - "statusText": "No Content" - }, - "startedDateTime": "2025-11-27T14:11:49.391Z", - "time": 562 - } - ], - "pages": [], - "version": "1.2" - } -} diff --git a/examples/v2/on-call/GetScheduleOnCallUser.ts b/examples/v2/on-call/GetScheduleOnCallUser.ts index 293ae8720798..11026c5234d7 100644 --- a/examples/v2/on-call/GetScheduleOnCallUser.ts +++ b/examples/v2/on-call/GetScheduleOnCallUser.ts @@ -1,5 +1,5 @@ /** - * Get the schedule on-call user returns "OK" response + * Get scheduled on-call user returns "OK" response */ import { client, v2 } from "@datadog/datadog-api-client"; diff --git a/features/v2/on-call.feature b/features/v2/on-call.feature index 7bcd1d00e1b5..c52e4291fc65 100644 --- a/features/v2/on-call.feature +++ b/features/v2/on-call.feature @@ -127,52 +127,52 @@ Feature: On-Call Then the response status is 200 OK @generated @skip @team:DataDog/on-call - Scenario: Get team on-call users returns "Bad Request" response - Given new "GetTeamOnCallUsers" request - And request contains "team_id" parameter from "REPLACE.ME" + Scenario: Get scheduled on-call user returns "Bad Request" response + Given new "GetScheduleOnCallUser" request + And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/on-call - Scenario: Get team on-call users returns "Not Found" response - Given new "GetTeamOnCallUsers" request - And request contains "team_id" parameter from "REPLACE.ME" + Scenario: Get scheduled on-call user returns "Not Found" response + Given new "GetScheduleOnCallUser" request + And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/on-call - Scenario: Get team on-call users returns "OK" response - Given new "GetTeamOnCallUsers" request + Scenario: Get scheduled on-call user returns "OK" response + Given new "GetScheduleOnCallUser" request And there is a valid "user" in the system - And there is a valid "dd_team" in the system And there is a valid "schedule" in the system - And there is a valid "escalation_policy" in the system - And there are valid "routing_rules" in the system - And request contains "team_id" parameter from "routing_rules.data.id" - And request contains "include" parameter with value "responders,escalations.responders" + And request contains "schedule_id" parameter from "schedule.data.id" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/on-call - Scenario: Get the schedule on-call user returns "Bad Request" response - Given new "GetScheduleOnCallUser" request - And request contains "schedule_id" parameter from "REPLACE.ME" + Scenario: Get team on-call users returns "Bad Request" response + Given new "GetTeamOnCallUsers" request + And request contains "team_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/on-call - Scenario: Get the schedule on-call user returns "Not Found" response - Given new "GetScheduleOnCallUser" request - And request contains "schedule_id" parameter from "REPLACE.ME" + Scenario: Get team on-call users returns "Not Found" response + Given new "GetTeamOnCallUsers" request + And request contains "team_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/on-call - Scenario: Get the schedule on-call user returns "OK" response - Given new "GetScheduleOnCallUser" request + Scenario: Get team on-call users returns "OK" response + Given new "GetTeamOnCallUsers" request And there is a valid "user" in the system + And there is a valid "dd_team" in the system And there is a valid "schedule" in the system - And request contains "schedule_id" parameter from "schedule.data.id" + And there is a valid "escalation_policy" in the system + And there are valid "routing_rules" in the system + And request contains "team_id" parameter from "routing_rules.data.id" + And request contains "include" parameter with value "responders,escalations.responders" When the request is sent Then the response status is 200 OK