Skip to content

Commit 775c787

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7a96be5 of spec repo
1 parent c7a2997 commit 775c787

File tree

8 files changed

+121
-113
lines changed

8 files changed

+121
-113
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74529,9 +74529,13 @@ paths:
7452974529
- apiKeyAuth: []
7453074530
appKeyAuth: []
7453174531
- AuthZ: []
74532-
summary: Get the schedule on-call user
74532+
summary: Get scheduled on-call user
7453374533
tags:
7453474534
- On-Call
74535+
x-permission:
74536+
operator: AND
74537+
permissions:
74538+
- on_call_read
7453574539
/api/v2/on-call/teams/{team_id}/on-call:
7453674540
get:
7453774541
description: Get a team's on-call users at a given time
@@ -74574,6 +74578,10 @@ paths:
7457474578
summary: Get team on-call users
7457574579
tags:
7457674580
- On-Call
74581+
x-permission:
74582+
operator: AND
74583+
permissions:
74584+
- on_call_read
7457774585
/api/v2/on-call/teams/{team_id}/routing-rules:
7457874586
get:
7457974587
description: Get a team's On-Call routing rules

examples/v2/on-call/GetScheduleOnCallUser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get the schedule on-call user returns "OK" response
2+
Get scheduled on-call user returns "OK" response
33
"""
44

55
from os import environ

src/datadog_api_client/v2/api/on_call_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def get_schedule_on_call_user(
527527
include: Union[str, UnsetType] = unset,
528528
filter_at_ts: Union[str, UnsetType] = unset,
529529
) -> Shift:
530-
"""Get the schedule on-call user.
530+
"""Get scheduled on-call user.
531531
532532
Retrieves the user who is on-call for the specified schedule at a given time.
533533
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-12-04T08:50:18.341Z
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"email":"Test-Get_scheduled_on_call_user_returns_OK_response-1764838218@datadoghq.com","title":"user
4+
title"},"type":"users"}}'
5+
headers:
6+
accept:
7+
- application/json
8+
content-type:
9+
- application/json
10+
method: POST
11+
uri: https://api.datadoghq.com/api/v2/users
12+
response:
13+
body:
14+
string: '{"data":{"type":"users","id":"42e2447f-d0ee-11f0-b246-f6a778e5e220","attributes":{"name":null,"handle":"test-get_scheduled_on_call_user_returns_ok_response-1764838218@datadoghq.com","created_at":"2025-12-04T08:50:19.140471+00:00","modified_at":"2025-12-04T08:50:19.140471+00:00","email":"test-get_scheduled_on_call_user_returns_ok_response-1764838218@datadoghq.com","icon":"https://secure.gravatar.com/avatar/6a6c3614a2758d626d4fcde0e9727205?s=48&d=retro","title":"user
15+
title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}
16+
17+
'
18+
headers:
19+
content-type:
20+
- application/json
21+
status:
22+
code: 201
23+
message: Created
24+
- request:
25+
body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-24T08:50:18.341Z","end_date":"2025-12-14T08:50:18.341Z","interval":{"days":1},"members":[{"user":{"id":"42e2447f-d0ee-11f0-b246-f6a778e5e220"}}],"name":"Layer
26+
1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-29T08:50:18.341Z"}],"name":"Test-Get_scheduled_on_call_user_returns_OK_response-1764838218","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}'
27+
headers:
28+
accept:
29+
- application/json
30+
content-type:
31+
- application/json
32+
method: POST
33+
uri: https://api.datadoghq.com/api/v2/on-call/schedules
34+
response:
35+
body:
36+
string: '{"data":{"id":"7f4eb086-4141-4f2a-ae4a-c0a06816672b","type":"schedules","attributes":{"name":"Test-Get_scheduled_on_call_user_returns_OK_response-1764838218","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"ad5985ec-b9e0-4dc7-aff9-a7bb75fc334f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}'
37+
headers:
38+
content-type:
39+
- application/vnd.api+json
40+
status:
41+
code: 201
42+
message: Created
43+
- request:
44+
body: null
45+
headers:
46+
accept:
47+
- application/json
48+
method: GET
49+
uri: https://api.datadoghq.com/api/v2/on-call/schedules/7f4eb086-4141-4f2a-ae4a-c0a06816672b/on-call
50+
response:
51+
body:
52+
string: '{"data":{"id":"42e2447f-d0ee-11f0-b246-f6a778e5e220-2025-12-04T03:50:19-05:00-2025-12-05T03:50:18-05:00","type":"shifts","attributes":{"end":"2025-12-05T03:50:18-05:00","start":"2025-12-04T03:50:19.261184-05:00"},"relationships":{"user":{"data":{"id":"42e2447f-d0ee-11f0-b246-f6a778e5e220","type":"users"}}}}}'
53+
headers:
54+
content-type:
55+
- application/vnd.api+json
56+
status:
57+
code: 200
58+
message: OK
59+
- request:
60+
body: null
61+
headers:
62+
accept:
63+
- '*/*'
64+
method: DELETE
65+
uri: https://api.datadoghq.com/api/v2/on-call/schedules/7f4eb086-4141-4f2a-ae4a-c0a06816672b
66+
response:
67+
body:
68+
string: ''
69+
headers: {}
70+
status:
71+
code: 204
72+
message: No Content
73+
- request:
74+
body: null
75+
headers:
76+
accept:
77+
- '*/*'
78+
method: DELETE
79+
uri: https://api.datadoghq.com/api/v2/users/42e2447f-d0ee-11f0-b246-f6a778e5e220
80+
response:
81+
body:
82+
string: ''
83+
headers: {}
84+
status:
85+
code: 204
86+
message: No Content
87+
version: 1

tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.frozen

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

tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.yaml

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

tests/v2/features/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

0 commit comments

Comments
 (0)