Skip to content

Commit d1db495

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[BGL-1863] Undo setting team rules (DataDog#3475)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 7ef4768 commit d1db495

File tree

5 files changed

+106
-71
lines changed

5 files changed

+106
-71
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-29T07:30:17.381Z
1+
2025-11-18T12:44:29.751Z

tests/scenarios/cassettes/TestScenarios/v2/Feature_On-Call/Scenario_Get_team_on-call_users_returns_OK_response.yaml

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: |
4-
{"data":{"attributes":{"email":"Test-Get_team_on_call_users_returns_OK_response-1748503817@datadoghq.com","title":"user title"},"type":"users"}}
4+
{"data":{"attributes":{"email":"Test-Get_team_on_call_users_returns_OK_response-1763469869@datadoghq.com","title":"user title"},"type":"users"}}
55
form: {}
66
headers:
77
Accept:
@@ -12,8 +12,8 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v2/users
1414
response:
15-
body: '{"data":{"type":"users","id":"c534e9e3-3c5e-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-get_team_on_call_users_returns_ok_response-1748503817@datadoghq.com","created_at":"2025-05-29T07:30:18.165739+00:00","modified_at":"2025-05-29T07:30:18.165739+00:00","email":"test-get_team_on_call_users_returns_ok_response-1748503817@datadoghq.com","icon":"https://secure.gravatar.com/avatar/a9b817a05a2ad95be147030f20ff95fb?s=48&d=retro","title":"user
16-
title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}
15+
body: '{"data":{"type":"users","id":"537c2919-c47c-11f0-9b08-ce88c9776d95","attributes":{"name":null,"handle":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","created_at":"2025-11-18T12:44:30.412060+00:00","modified_at":"2025-11-18T12:44:30.412060+00:00","email":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e1a08271c5b3a54aaa074185b1550add?s=48&d=retro","title":"user
16+
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"}}}}}
1717
1818
'
1919
code: 201
@@ -24,7 +24,7 @@ interactions:
2424
status: 201 Created
2525
- request:
2626
body: |
27-
{"data":{"attributes":{"handle":"test-handle-aa0dbd3d9b27ea9e","name":"test-name-aa0dbd3d9b27ea9e"},"type":"team"}}
27+
{"data":{"attributes":{"handle":"test-handle-b0479fe6a2cd9873","name":"test-name-b0479fe6a2cd9873"},"type":"team"}}
2828
form: {}
2929
headers:
3030
Accept:
@@ -35,18 +35,16 @@ interactions:
3535
method: POST
3636
url: https://api.datadoghq.com/api/v2/team
3737
response:
38-
body: '{"data":{"type":"team","id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","attributes":{"name":"test-name-aa0dbd3d9b27ea9e","handle":"test-handle-aa0dbd3d9b27ea9e","summary":null,"description":null,"avatar":null,"banner":1,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T07:30:18.898463+00:00","modified_at":"2025-05-29T07:30:18.898474+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/6a8339f9-9d86-4948-a469-1b0cbef769bb/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/6a8339f9-9d86-4948-a469-1b0cbef769bb/permission-settings"}}}}}
39-
40-
'
38+
body: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team","attributes":{"avatar":null,"banner":15,"created_at":"2025-11-18T12:44:31.250613+00:00","description":null,"handle":"test-handle-b0479fe6a2cd9873","hidden_modules":[],"link_count":0,"modified_at":"2025-11-18T12:44:31.250613+00:00","name":"test-name-b0479fe6a2cd9873","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c/permission-settings"}}}}}'
4139
code: 201
4240
duration: 0ms
4341
headers:
4442
Content-Type:
45-
- application/json
43+
- application/vnd.api+json
4644
status: 201 Created
4745
- request:
4846
body: |
49-
{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T07:30:17.381Z","end_date":"2025-06-08T07:30:17.381Z","interval":{"days":1},"members":[{"user":{"id":"c534e9e3-3c5e-11f0-b6eb-6e406f40657f"}}],"name":"Layer 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T07:30:17.381Z"}],"name":"Test-Get_team_on_call_users_returns_OK_response-1748503817","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}
47+
{"data":{"attributes":{"layers":[{"effective_date":"2025-11-08T12:44:29.751Z","end_date":"2025-11-28T12:44:29.751Z","interval":{"days":1},"members":[{"user":{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95"}}],"name":"Layer 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-13T12:44:29.751Z"}],"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}
5048
form: {}
5149
headers:
5250
Accept:
@@ -57,7 +55,7 @@ interactions:
5755
method: POST
5856
url: https://api.datadoghq.com/api/v2/on-call/schedules
5957
response:
60-
body: '{"data":{"id":"ba6c57a1-bb93-4f5a-a22b-174f84b0c5d6","type":"schedules","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1748503817","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"d12469b6-85d8-461a-89c6-61fc956c1446","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}'
58+
body: '{"data":{"id":"3be141a8-848d-4af1-86de-e5d76cd6e4fc","type":"schedules","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"0c2a552f-a2e0-47ca-ad8b-4407608b3f67","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}'
6159
code: 201
6260
duration: 0ms
6361
headers:
@@ -66,7 +64,7 @@ interactions:
6664
status: 201 Created
6765
- request:
6866
body: |
69-
{"data":{"attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1748503817","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","type":"teams"},{"id":"ba6c57a1-bb93-4f5a-a22b-174f84b0c5d6","type":"schedules"},{"id":"c534e9e3-3c5e-11f0-b6eb-6e406f40657f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","type":"teams"}]}},"type":"policies"}}
67+
{"data":{"attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"},{"id":"3be141a8-848d-4af1-86de-e5d76cd6e4fc","type":"schedules"},{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}},"type":"policies"}}
7068
form: {}
7169
headers:
7270
Accept:
@@ -77,7 +75,7 @@ interactions:
7775
method: POST
7876
url: https://api.datadoghq.com/api/v2/on-call/escalation-policies
7977
response:
80-
body: '{"data":{"id":"5cfa8139-510a-4965-8f10-dc79488fcd89","type":"policies","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1748503817","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"03c363ed-929e-4fa1-8397-e80a5b422648","type":"steps"},{"id":"0c678f92-8639-4d72-ad5a-f40307c1d935","type":"steps"}]},"teams":{"data":[{"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","type":"teams"}]}}}}'
78+
body: '{"data":{"id":"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7","type":"policies","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"11f436b4-85bf-47c8-ab21-e851974ccf60","type":"steps"},{"id":"6f0da5a9-4b7d-4d12-a859-4799599f074d","type":"steps"}]},"teams":{"data":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}}}}'
8179
code: 201
8280
duration: 0ms
8381
headers:
@@ -86,7 +84,7 @@ interactions:
8684
status: 201 Created
8785
- request:
8886
body: |
89-
{"data":{"attributes":{"rules":[{"actions":[],"policy_id":"5cfa8139-510a-4965-8f10-dc79488fcd89","query":"","urgency":"low"}]},"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","type":"team_routing_rules"}}
87+
{"data":{"attributes":{"rules":[{"actions":[],"policy_id":"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7","query":"","urgency":"low"}]},"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules"}}
9088
form: {}
9189
headers:
9290
Accept:
@@ -95,9 +93,9 @@ interactions:
9593
- application/json
9694
id: 4
9795
method: PUT
98-
url: https://api.datadoghq.com/api/v2/on-call/teams/6a8339f9-9d86-4948-a469-1b0cbef769bb/routing-rules
96+
url: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/routing-rules
9997
response:
100-
body: '{"data":{"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-6a8339f9-9d86-4948-a469-1b0cbef769bb-rule-0","type":"team_routing_rules"}]}}}}'
98+
body: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-11ba6480-761b-4dbd-b4a0-c77a9df6740c-rule-0","type":"team_routing_rules"}]}}}}'
10199
code: 200
102100
duration: 0ms
103101
headers:
@@ -112,33 +110,35 @@ interactions:
112110
- application/json
113111
id: 5
114112
method: GET
115-
url: https://api.datadoghq.com/api/v2/on-call/teams/6a8339f9-9d86-4948-a469-1b0cbef769bb/on-call?include=responders%2Cescalations.responders
113+
url: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/on-call?include=responders%2Cescalations.responders
116114
response:
117-
body: '{"data":{"id":"6a8339f9-9d86-4948-a469-1b0cbef769bb-1748503821","type":"team_oncall_responders","relationships":{"escalations":{"data":[]},"responders":{"data":[{"id":"c534e9e3-3c5e-11f0-b6eb-6e406f40657f","type":"users"}]}}},"included":[{"id":"c534e9e3-3c5e-11f0-b6eb-6e406f40657f","type":"users","attributes":{"email":"test-get_team_on_call_users_returns_ok_response-1748503817@datadoghq.com","name":"","status":"pending"}}]}'
115+
body: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c-1763469873","type":"team_oncall_responders","relationships":{"escalations":{"data":[]},"responders":{"data":[{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users"}]}}},"included":[{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users","attributes":{"email":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","name":"","status":"pending"}}]}'
118116
code: 200
119117
duration: 0ms
120118
headers:
121119
Content-Type:
122120
- application/vnd.api+json
123121
status: 200 OK
124122
- request:
125-
body: ''
123+
body: |
124+
{"data":{"attributes":{"rules":[]},"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules"}}
126125
form: {}
127126
headers:
128127
Accept:
129-
- '*/*'
128+
- application/json
129+
Content-Type:
130+
- application/json
130131
id: 6
131-
method: DELETE
132-
url: https://api.datadoghq.com/api/v2/on-call/escalation-policies/5cfa8139-510a-4965-8f10-dc79488fcd89
132+
method: PUT
133+
url: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/routing-rules
133134
response:
134-
body: '{"errors":[{"title":"Generic Error","detail":"policy[5cfa8139-510a-4965-8f10-dc79488fcd89]
135-
is in use"}]}'
136-
code: 409
135+
body: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}'
136+
code: 200
137137
duration: 0ms
138138
headers:
139139
Content-Type:
140140
- application/vnd.api+json
141-
status: 409 Conflict
141+
status: 200 OK
142142
- request:
143143
body: ''
144144
form: {}
@@ -147,16 +147,13 @@ interactions:
147147
- '*/*'
148148
id: 7
149149
method: DELETE
150-
url: https://api.datadoghq.com/api/v2/on-call/schedules/ba6c57a1-bb93-4f5a-a22b-174f84b0c5d6
150+
url: https://api.datadoghq.com/api/v2/on-call/escalation-policies/5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7
151151
response:
152-
body: '{"errors":[{"title":"Generic Error","detail":"schedule[ba6c57a1-bb93-4f5a-a22b-174f84b0c5d6]
153-
is in use"}]}'
154-
code: 409
152+
body: ''
153+
code: 204
155154
duration: 0ms
156-
headers:
157-
Content-Type:
158-
- application/vnd.api+json
159-
status: 409 Conflict
155+
headers: {}
156+
status: 204 No Content
160157
- request:
161158
body: ''
162159
form: {}
@@ -165,7 +162,7 @@ interactions:
165162
- '*/*'
166163
id: 8
167164
method: DELETE
168-
url: https://api.datadoghq.com/api/v2/team/6a8339f9-9d86-4948-a469-1b0cbef769bb
165+
url: https://api.datadoghq.com/api/v2/on-call/schedules/3be141a8-848d-4af1-86de-e5d76cd6e4fc
169166
response:
170167
body: ''
171168
code: 204
@@ -180,7 +177,22 @@ interactions:
180177
- '*/*'
181178
id: 9
182179
method: DELETE
183-
url: https://api.datadoghq.com/api/v2/users/c534e9e3-3c5e-11f0-b6eb-6e406f40657f
180+
url: https://api.datadoghq.com/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c
181+
response:
182+
body: ''
183+
code: 204
184+
duration: 0ms
185+
headers: {}
186+
status: 204 No Content
187+
- request:
188+
body: ''
189+
form: {}
190+
headers:
191+
Accept:
192+
- '*/*'
193+
id: 10
194+
method: DELETE
195+
url: https://api.datadoghq.com/api/v2/users/537c2919-c47c-11f0-9b08-ce88c9776d95
184196
response:
185197
body: ''
186198
code: 204
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-29T04:54:12.242Z
1+
2025-11-18T13:04:14.085Z

0 commit comments

Comments
 (0)