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 @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-04T08:50:18.341Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion examples/v2/on-call/GetScheduleOnCallUser.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get the schedule on-call user returns "OK" response
# Get scheduled on-call user returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OnCallAPI.new
Expand Down
44 changes: 22 additions & 22 deletions features/v2/on-call.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 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 scheduled on-call user.
#
# Retrieves the user who is on-call for the specified schedule at a given time.
#
Expand Down
Loading