WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0264873

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add permission requirements to on-call endpoints (#2810)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 981a9b0 commit 0264873

File tree

8 files changed

+136
-128
lines changed

8 files changed

+136
-128
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75178,9 +75178,13 @@ paths:
7517875178
- apiKeyAuth: []
7517975179
appKeyAuth: []
7518075180
- AuthZ: []
75181-
summary: Get the schedule on-call user
75181+
summary: Get scheduled on-call user
7518275182
tags:
7518375183
- On-Call
75184+
x-permission:
75185+
operator: AND
75186+
permissions:
75187+
- on_call_read
7518475188
/api/v2/on-call/teams/{team_id}/on-call:
7518575189
get:
7518675190
description: Get a team's on-call users at a given time
@@ -75223,6 +75227,10 @@ paths:
7522375227
summary: Get team on-call users
7522475228
tags:
7522575229
- On-Call
75230+
x-permission:
75231+
operator: AND
75232+
permissions:
75233+
- on_call_read
7522675234
/api/v2/on-call/teams/{team_id}/routing-rules:
7522775235
get:
7522875236
description: Get a team's On-Call routing rules
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-04T08:50:18.341Z

cassettes/features/v2/on-call/Get-scheduled-on-call-user-returns-OK-response.yml

Lines changed: 101 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen

Lines changed: 0 additions & 1 deletion
This file was deleted.

cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

examples/v2/on-call/GetScheduleOnCallUser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Get the schedule on-call user returns "OK" response
1+
# Get scheduled on-call user returns "OK" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::OnCallAPI.new

features/v2/on-call.feature

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -127,52 +127,52 @@ Feature: On-Call
127127
Then the response status is 200 OK
128128

129129
@generated @skip @team:DataDog/on-call
130-
Scenario: Get team on-call users returns "Bad Request" response
131-
Given new "GetTeamOnCallUsers" request
132-
And request contains "team_id" parameter from "REPLACE.ME"
130+
Scenario: Get scheduled on-call user returns "Bad Request" response
131+
Given new "GetScheduleOnCallUser" request
132+
And request contains "schedule_id" parameter from "REPLACE.ME"
133133
When the request is sent
134134
Then the response status is 400 Bad Request
135135

136136
@generated @skip @team:DataDog/on-call
137-
Scenario: Get team on-call users returns "Not Found" response
138-
Given new "GetTeamOnCallUsers" request
139-
And request contains "team_id" parameter from "REPLACE.ME"
137+
Scenario: Get scheduled on-call user returns "Not Found" response
138+
Given new "GetScheduleOnCallUser" request
139+
And request contains "schedule_id" parameter from "REPLACE.ME"
140140
When the request is sent
141141
Then the response status is 404 Not Found
142142

143143
@team:DataDog/on-call
144-
Scenario: Get team on-call users returns "OK" response
145-
Given new "GetTeamOnCallUsers" request
144+
Scenario: Get scheduled on-call user returns "OK" response
145+
Given new "GetScheduleOnCallUser" request
146146
And there is a valid "user" in the system
147-
And there is a valid "dd_team" in the system
148147
And there is a valid "schedule" in the system
149-
And there is a valid "escalation_policy" in the system
150-
And there are valid "routing_rules" in the system
151-
And request contains "team_id" parameter from "routing_rules.data.id"
152-
And request contains "include" parameter with value "responders,escalations.responders"
148+
And request contains "schedule_id" parameter from "schedule.data.id"
153149
When the request is sent
154150
Then the response status is 200 OK
155151

156152
@generated @skip @team:DataDog/on-call
157-
Scenario: Get the schedule on-call user returns "Bad Request" response
158-
Given new "GetScheduleOnCallUser" request
159-
And request contains "schedule_id" parameter from "REPLACE.ME"
153+
Scenario: Get team on-call users returns "Bad Request" response
154+
Given new "GetTeamOnCallUsers" request
155+
And request contains "team_id" parameter from "REPLACE.ME"
160156
When the request is sent
161157
Then the response status is 400 Bad Request
162158

163159
@generated @skip @team:DataDog/on-call
164-
Scenario: Get the schedule on-call user returns "Not Found" response
165-
Given new "GetScheduleOnCallUser" request
166-
And request contains "schedule_id" parameter from "REPLACE.ME"
160+
Scenario: Get team on-call users returns "Not Found" response
161+
Given new "GetTeamOnCallUsers" request
162+
And request contains "team_id" parameter from "REPLACE.ME"
167163
When the request is sent
168164
Then the response status is 404 Not Found
169165

170166
@team:DataDog/on-call
171-
Scenario: Get the schedule on-call user returns "OK" response
172-
Given new "GetScheduleOnCallUser" request
167+
Scenario: Get team on-call users returns "OK" response
168+
Given new "GetTeamOnCallUsers" request
173169
And there is a valid "user" in the system
170+
And there is a valid "dd_team" in the system
174171
And there is a valid "schedule" in the system
175-
And request contains "schedule_id" parameter from "schedule.data.id"
172+
And there is a valid "escalation_policy" in the system
173+
And there are valid "routing_rules" in the system
174+
And request contains "team_id" parameter from "routing_rules.data.id"
175+
And request contains "include" parameter with value "responders,escalations.responders"
176176
When the request is sent
177177
Then the response status is 200 OK
178178

lib/datadog_api_client/v2/api/on_call_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,15 +492,15 @@ def get_on_call_team_routing_rules_with_http_info(team_id, opts = {})
492492
return data, status_code, headers
493493
end
494494

495-
# Get the schedule on-call user.
495+
# Get scheduled on-call user.
496496
#
497497
# @see #get_schedule_on_call_user_with_http_info
498498
def get_schedule_on_call_user(schedule_id, opts = {})
499499
data, _status_code, _headers = get_schedule_on_call_user_with_http_info(schedule_id, opts)
500500
data
501501
end
502502

503-
# Get the schedule on-call user.
503+
# Get scheduled on-call user.
504504
#
505505
# Retrieves the user who is on-call for the specified schedule at a given time.
506506
#

0 commit comments

Comments
 (0)