Skip to content

Commit d1fc365

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Update On-Call Escalation policies endpoints schemas and description (#2526)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent b81aba7 commit d1fc365

17 files changed

+635
-30
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-24 04:43:28.722596",
8-
"spec_repo_commit": "ab6a0f8c"
7+
"regenerated": "2025-04-24 13:38:36.353901",
8+
"spec_repo_commit": "4295fd1a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-24 04:43:28.738196",
13-
"spec_repo_commit": "ab6a0f8c"
12+
"regenerated": "2025-04-24 13:38:36.368994",
13+
"spec_repo_commit": "4295fd1a"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -13065,6 +13065,7 @@ components:
1306513065
$ref: '#/components/schemas/EscalationPolicyDataAttributes'
1306613066
id:
1306713067
description: Specifies the unique identifier of the escalation policy.
13068+
example: ab000000-0000-0000-0000-000000000000
1306813069
type: string
1306913070
relationships:
1307013071
$ref: '#/components/schemas/EscalationPolicyDataRelationships'
@@ -28006,6 +28007,7 @@ components:
2800628007
$ref: '#/components/schemas/ScheduleCreateRequestDataType'
2800728008
required:
2800828009
- type
28010+
- attributes
2800928011
type: object
2801028012
ScheduleCreateRequestDataAttributes:
2801128013
description: Describes the main attributes for creating a new schedule, including
@@ -47481,7 +47483,7 @@ paths:
4748147483
- apiKeyAuth: []
4748247484
appKeyAuth: []
4748347485
- AuthZ: []
47484-
summary: Create on call escalation policy
47486+
summary: Create on-call escalation policy
4748547487
tags:
4748647488
- On-Call
4748747489
/api/v2/on-call/escalation-policies/{policy_id}:
@@ -47511,7 +47513,7 @@ paths:
4751147513
- apiKeyAuth: []
4751247514
appKeyAuth: []
4751347515
- AuthZ: []
47514-
summary: Delete on call escalation policy
47516+
summary: Delete on-call escalation policy
4751547517
tags:
4751647518
- On-Call
4751747519
get:
@@ -47552,7 +47554,7 @@ paths:
4755247554
- apiKeyAuth: []
4755347555
appKeyAuth: []
4755447556
- AuthZ: []
47555-
summary: Get on call escalation policy
47557+
summary: Get on-call escalation policy
4755647558
tags:
4755747559
- On-Call
4755847560
put:
@@ -47599,7 +47601,7 @@ paths:
4759947601
- apiKeyAuth: []
4760047602
appKeyAuth: []
4760147603
- AuthZ: []
47602-
summary: Update on call escalation policy
47604+
summary: Update on-call escalation policy
4760347605
tags:
4760447606
- On-Call
4760547607
/api/v2/on-call/schedules:

examples/v2/on-call/CreateOnCallEscalationPolicy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Create on call escalation policy returns "Created" response
2+
Create on-call escalation policy returns "Created" response
33
"""
44

55
from os import environ

examples/v2/on-call/DeleteOnCallEscalationPolicy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Delete on call escalation policy returns "No Content" response
2+
Delete on-call escalation policy returns "No Content" response
33
"""
44

55
from os import environ

examples/v2/on-call/GetOnCallEscalationPolicy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get on call escalation policy returns "OK" response
2+
Get on-call escalation policy returns "OK" response
33
"""
44

55
from os import environ

examples/v2/on-call/UpdateOnCallEscalationPolicy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Update on call escalation policy returns "OK" response
2+
Update on-call escalation policy returns "OK" response
33
"""
44

55
from os import environ

src/datadog_api_client/v2/api/on_call_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def create_on_call_escalation_policy(
250250
*,
251251
include: Union[str, UnsetType] = unset,
252252
) -> EscalationPolicy:
253-
"""Create on call escalation policy.
253+
"""Create on-call escalation policy.
254254
255255
Create a new on-call escalation policy
256256
@@ -294,7 +294,7 @@ def delete_on_call_escalation_policy(
294294
self,
295295
policy_id: str,
296296
) -> None:
297-
"""Delete on call escalation policy.
297+
"""Delete on-call escalation policy.
298298
299299
Delete an on-call escalation policy
300300
@@ -330,7 +330,7 @@ def get_on_call_escalation_policy(
330330
*,
331331
include: Union[str, UnsetType] = unset,
332332
) -> EscalationPolicy:
333-
"""Get on call escalation policy.
333+
"""Get on-call escalation policy.
334334
335335
Get an on-call escalation policy
336336
@@ -379,7 +379,7 @@ def update_on_call_escalation_policy(
379379
*,
380380
include: Union[str, UnsetType] = unset,
381381
) -> EscalationPolicy:
382-
"""Update on call escalation policy.
382+
"""Update on-call escalation policy.
383383
384384
Update an on-call escalation policy
385385

src/datadog_api_client/v2/model/schedule_create_request_data.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,26 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49+
attributes: ScheduleCreateRequestDataAttributes,
4950
type: ScheduleCreateRequestDataType,
50-
attributes: Union[ScheduleCreateRequestDataAttributes, UnsetType] = unset,
5151
relationships: Union[ScheduleCreateRequestDataRelationships, UnsetType] = unset,
5252
**kwargs,
5353
):
5454
"""
5555
The core data wrapper for creating a schedule, encompassing attributes, relationships, and the resource type.
5656
5757
:param attributes: Describes the main attributes for creating a new schedule, including name, layers, time zone, and tags.
58-
:type attributes: ScheduleCreateRequestDataAttributes, optional
58+
:type attributes: ScheduleCreateRequestDataAttributes
5959
6060
:param relationships: Gathers relationship objects for the schedule creation request, including the teams to associate.
6161
:type relationships: ScheduleCreateRequestDataRelationships, optional
6262
6363
:param type: Schedules resource type.
6464
:type type: ScheduleCreateRequestDataType
6565
"""
66-
if attributes is not unset:
67-
kwargs["attributes"] = attributes
6866
if relationships is not unset:
6967
kwargs["relationships"] = relationships
7068
super().__init__(kwargs)
7169

70+
self_.attributes = attributes
7271
self_.type = type
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-04-24T03:17:05.259Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-04-14T03:17:05.259Z","end_date":"2025-05-04T03:17:05.259Z","interval":{"days":1},"members":[{"user":{"id":"890f29d4-0b7a-11f0-aeb2-760fcae4f596"}}],"name":"Layer
4+
1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-04-19T03:17:05.259Z"}],"name":"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625","tags":["tag1","tag2"],"time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}'
5+
headers:
6+
accept:
7+
- application/json
8+
content-type:
9+
- application/json
10+
method: POST
11+
uri: https://api.datadoghq.com/api/v2/on-call/schedules
12+
response:
13+
body:
14+
string: '{"data":{"id":"2a44a887-add2-47f7-9535-92a2a8ebea79","type":"schedules","attributes":{"name":"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625","tags":["tag1","tag2"],"time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"accb6605-37be-410c-86ad-a7d3400919a3","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}'
15+
headers:
16+
content-type:
17+
- application/vnd.api+json
18+
status:
19+
code: 201
20+
message: Created
21+
- request:
22+
body: '{"data":{"attributes":{"handle":"test-handle-e9912af3975c2380","name":"test-name-e9912af3975c2380"},"type":"team"}}'
23+
headers:
24+
accept:
25+
- application/json
26+
content-type:
27+
- application/json
28+
method: POST
29+
uri: https://api.datadoghq.com/api/v2/team
30+
response:
31+
body:
32+
string: '{"data":{"type":"team","id":"15667dfa-83d1-4a17-a100-d8474fdb723d","attributes":{"name":"test-name-e9912af3975c2380","handle":"test-handle-e9912af3975c2380","summary":null,"description":null,"avatar":null,"banner":1,"visible_modules":[],"hidden_modules":[],"created_at":"2025-04-24T03:17:06.086645+00:00","modified_at":"2025-04-24T03:17:06.086653+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/15667dfa-83d1-4a17-a100-d8474fdb723d/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/15667dfa-83d1-4a17-a100-d8474fdb723d/permission-settings"}}}}}
33+
34+
'
35+
headers:
36+
content-type:
37+
- application/json
38+
status:
39+
code: 201
40+
message: Created
41+
- request:
42+
body: '{"data":{"attributes":{"email":"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625@datadoghq.com","title":"user
43+
title"},"type":"users"}}'
44+
headers:
45+
accept:
46+
- application/json
47+
content-type:
48+
- application/json
49+
method: POST
50+
uri: https://api.datadoghq.com/api/v2/users
51+
response:
52+
body:
53+
string: '{"data":{"type":"users","id":"99c39f2a-20ba-11f0-892a-8ed3debb4e3c","attributes":{"name":null,"handle":"test-create_on_call_escalation_policy_returns_created_response-1745464625@datadoghq.com","created_at":"2025-04-24T03:17:06.422591+00:00","modified_at":"2025-04-24T03:17:06.422591+00:00","email":"test-create_on_call_escalation_policy_returns_created_response-1745464625@datadoghq.com","icon":"https://secure.gravatar.com/avatar/c1e19926cae1d8a175b99b6952c20aca?s=48&d=retro","title":"user
54+
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"}}}}}
55+
56+
'
57+
headers:
58+
content-type:
59+
- application/json
60+
status:
61+
code: 201
62+
message: Created
63+
- request:
64+
body: '{"data":{"attributes":{"description":"Escalation Policy 1 description","name":"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"99c39f2a-20ba-11f0-892a-8ed3debb4e3c","type":"users"},{"id":"2a44a887-add2-47f7-9535-92a2a8ebea79","type":"schedules"},{"id":"15667dfa-83d1-4a17-a100-d8474fdb723d","type":"teams"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"15667dfa-83d1-4a17-a100-d8474fdb723d","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"15667dfa-83d1-4a17-a100-d8474fdb723d","type":"teams"}]}},"type":"policies"}}'
65+
headers:
66+
accept:
67+
- application/json
68+
content-type:
69+
- application/json
70+
method: POST
71+
uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies
72+
response:
73+
body:
74+
string: '{"data":{"id":"9269a3cc-3191-435d-b878-438cbe9f288e","type":"policies","attributes":{"description":"Escalation
75+
Policy 1 description","name":"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"b292cc93-8f52-426d-88fb-0ac2b4a6fa10","type":"steps"},{"id":"aa60c048-510f-4e0d-bb1d-fc51606a66a1","type":"steps"}]},"teams":{"data":[{"id":"15667dfa-83d1-4a17-a100-d8474fdb723d","type":"teams"}]}}}}'
76+
headers:
77+
content-type:
78+
- application/vnd.api+json
79+
status:
80+
code: 201
81+
message: Created
82+
- request:
83+
body: null
84+
headers:
85+
accept:
86+
- '*/*'
87+
method: DELETE
88+
uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/9269a3cc-3191-435d-b878-438cbe9f288e
89+
response:
90+
body:
91+
string: ''
92+
headers: {}
93+
status:
94+
code: 204
95+
message: No Content
96+
- request:
97+
body: null
98+
headers:
99+
accept:
100+
- '*/*'
101+
method: DELETE
102+
uri: https://api.datadoghq.com/api/v2/users/99c39f2a-20ba-11f0-892a-8ed3debb4e3c
103+
response:
104+
body:
105+
string: ''
106+
headers: {}
107+
status:
108+
code: 204
109+
message: No Content
110+
- request:
111+
body: null
112+
headers:
113+
accept:
114+
- '*/*'
115+
method: DELETE
116+
uri: https://api.datadoghq.com/api/v2/team/15667dfa-83d1-4a17-a100-d8474fdb723d
117+
response:
118+
body:
119+
string: ''
120+
headers: {}
121+
status:
122+
code: 204
123+
message: No Content
124+
- request:
125+
body: null
126+
headers:
127+
accept:
128+
- '*/*'
129+
method: DELETE
130+
uri: https://api.datadoghq.com/api/v2/on-call/schedules/2a44a887-add2-47f7-9535-92a2a8ebea79
131+
response:
132+
body:
133+
string: ''
134+
headers: {}
135+
status:
136+
code: 204
137+
message: No Content
138+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-04-24T03:17:07.960Z

0 commit comments

Comments
 (0)