From 81385fe2b9ed8ba96daa6834be143933b05597f8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 25 Nov 2025 17:45:26 +0000 Subject: [PATCH] Regenerate client from commit 479ca66 of spec repo --- .generator/schemas/v2/openapi.yaml | 10 ++++++++- examples/v2/on-call/GetScheduleOnCallUser.py | 8 ++----- .../GetScheduleOnCallUser_3672445524.py | 19 +++++++++++++++++ src/datadog_api_client/v2/api/on_call_api.py | 2 +- tests/v2/features/on-call.feature | 21 ++++++++++++------- 5 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 examples/v2/on-call/GetScheduleOnCallUser_3672445524.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb71549..32b9503e62 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -72918,9 +72918,13 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get the schedule on-call user + summary: Get the 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 @@ -72963,6 +72967,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/examples/v2/on-call/GetScheduleOnCallUser.py b/examples/v2/on-call/GetScheduleOnCallUser.py index 4c4d0722ed..6e9aa75f29 100644 --- a/examples/v2/on-call/GetScheduleOnCallUser.py +++ b/examples/v2/on-call/GetScheduleOnCallUser.py @@ -1,19 +1,15 @@ """ -Get the schedule on-call user returns "OK" response +Get the scheduled on-call user returns "OK" response """ -from os import environ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.on_call_api import OnCallApi -# there is a valid "schedule" in the system -SCHEDULE_DATA_ID = environ["SCHEDULE_DATA_ID"] - configuration = Configuration() with ApiClient(configuration) as api_client: api_instance = OnCallApi(api_client) response = api_instance.get_schedule_on_call_user( - schedule_id=SCHEDULE_DATA_ID, + schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d", ) print(response) diff --git a/examples/v2/on-call/GetScheduleOnCallUser_3672445524.py b/examples/v2/on-call/GetScheduleOnCallUser_3672445524.py new file mode 100644 index 0000000000..4c4d0722ed --- /dev/null +++ b/examples/v2/on-call/GetScheduleOnCallUser_3672445524.py @@ -0,0 +1,19 @@ +""" +Get the schedule on-call user returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.on_call_api import OnCallApi + +# there is a valid "schedule" in the system +SCHEDULE_DATA_ID = environ["SCHEDULE_DATA_ID"] + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = OnCallApi(api_client) + response = api_instance.get_schedule_on_call_user( + schedule_id=SCHEDULE_DATA_ID, + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/on_call_api.py b/src/datadog_api_client/v2/api/on_call_api.py index 34755ee80e..41897ffd83 100644 --- a/src/datadog_api_client/v2/api/on_call_api.py +++ b/src/datadog_api_client/v2/api/on_call_api.py @@ -527,7 +527,7 @@ def get_schedule_on_call_user( include: Union[str, UnsetType] = unset, filter_at_ts: Union[str, UnsetType] = unset, ) -> Shift: - """Get the schedule on-call user. + """Get the scheduled on-call user. Retrieves the user who is on-call for the specified schedule at a given time. diff --git a/tests/v2/features/on-call.feature b/tests/v2/features/on-call.feature index 39640938e4..251f00fae4 100644 --- a/tests/v2/features/on-call.feature +++ b/tests/v2/features/on-call.feature @@ -153,26 +153,33 @@ Feature: On-Call When the request is sent Then the response status is 200 OK + @team:DataDog/on-call + Scenario: Get the schedule on-call user returns "OK" response + Given new "GetScheduleOnCallUser" request + And there is a valid "user" in the system + And there is a valid "schedule" in the system + 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 + Scenario: Get the 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 the schedule on-call user returns "Not Found" response + Scenario: Get the 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 the schedule on-call user returns "OK" response + @generated @skip @team:DataDog/on-call + Scenario: Get the 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 "schedule" in the system - And request contains "schedule_id" parameter from "schedule.data.id" + And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK