Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions examples/v2/on-call/GetScheduleOnCallUser.rb
Original file line number Diff line number Diff line change
@@ -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")
8 changes: 8 additions & 0 deletions examples/v2/on-call/GetScheduleOnCallUser_3672445524.rb
Original file line number Diff line number Diff line change
@@ -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)
21 changes: 14 additions & 7 deletions features/v2/on-call.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/datadog_api_client/v2/api/on_call_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,15 +492,15 @@ 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 = {})
data, _status_code, _headers = get_schedule_on_call_user_with_http_info(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.
#
Expand Down
Loading