diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb715496a..32b9503e6201 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.rb b/examples/v2/on-call/GetScheduleOnCallUser.rb index f759d81af559..98165c8cda1b 100644 --- a/examples/v2/on-call/GetScheduleOnCallUser.rb +++ b/examples/v2/on-call/GetScheduleOnCallUser.rb @@ -1,8 +1,5 @@ -# Get the schedule on-call user returns "OK" response +# Get the scheduled on-call user returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::OnCallAPI.new - -# there is a valid "schedule" in the system -SCHEDULE_DATA_ID = ENV["SCHEDULE_DATA_ID"] -p api_instance.get_schedule_on_call_user(SCHEDULE_DATA_ID) +p api_instance.get_schedule_on_call_user("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") diff --git a/examples/v2/on-call/GetScheduleOnCallUser_3672445524.rb b/examples/v2/on-call/GetScheduleOnCallUser_3672445524.rb new file mode 100644 index 000000000000..f759d81af559 --- /dev/null +++ b/examples/v2/on-call/GetScheduleOnCallUser_3672445524.rb @@ -0,0 +1,8 @@ +# Get the schedule on-call user returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::OnCallAPI.new + +# there is a valid "schedule" in the system +SCHEDULE_DATA_ID = ENV["SCHEDULE_DATA_ID"] +p api_instance.get_schedule_on_call_user(SCHEDULE_DATA_ID) diff --git a/features/v2/on-call.feature b/features/v2/on-call.feature index 39640938e4a1..251f00fae404 100644 --- a/features/v2/on-call.feature +++ b/features/v2/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 diff --git a/lib/datadog_api_client/v2/api/on_call_api.rb b/lib/datadog_api_client/v2/api/on_call_api.rb index 87628c506a0a..b857092ebf52 100644 --- a/lib/datadog_api_client/v2/api/on_call_api.rb +++ b/lib/datadog_api_client/v2/api/on_call_api.rb @@ -492,7 +492,7 @@ def get_on_call_team_routing_rules_with_http_info(team_id, opts = {}) return data, status_code, headers end - # Get the schedule on-call user. + # Get the scheduled on-call user. # # @see #get_schedule_on_call_user_with_http_info def get_schedule_on_call_user(schedule_id, opts = {}) @@ -500,7 +500,7 @@ def get_schedule_on_call_user(schedule_id, opts = {}) data end - # 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. #