Skip to content

Commit e847659

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 25b69b54 of spec repo
1 parent 5f4b128 commit e847659

19 files changed

+809
-4
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-05-06 15:06:00.944093",
8-
"spec_repo_commit": "d0ee626b"
7+
"regenerated": "2025-05-07 05:43:19.347373",
8+
"spec_repo_commit": "25b69b54"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-06 15:06:00.959289",
13-
"spec_repo_commit": "d0ee626b"
12+
"regenerated": "2025-05-07 05:43:19.362463",
13+
"spec_repo_commit": "25b69b54"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+148
Original file line numberDiff line numberDiff line change
@@ -35847,6 +35847,112 @@ components:
3584735847
description: Link to the Incident created on ServiceNow
3584835848
type: string
3584935849
type: object
35850+
Shift:
35851+
description: The definition of `Shift` object.
35852+
example:
35853+
data:
35854+
attributes:
35855+
end: '2025-05-07T03:53:01.206662873Z'
35856+
start: '2025-05-07T02:53:01.206662814Z'
35857+
id: 00000000-0000-0000-0000-000000000000
35858+
relationships:
35859+
user:
35860+
data:
35861+
id: 00000000-aba1-0000-0000-000000000000
35862+
type: users
35863+
type: shifts
35864+
included:
35865+
- attributes:
35866+
email: foo@bar.com
35867+
name: User 1
35868+
status: ''
35869+
id: 00000000-aba1-0000-0000-000000000000
35870+
type: users
35871+
properties:
35872+
data:
35873+
$ref: '#/components/schemas/ShiftData'
35874+
included:
35875+
description: The `Shift` `included`.
35876+
items:
35877+
$ref: '#/components/schemas/ShiftIncluded'
35878+
type: array
35879+
type: object
35880+
ShiftData:
35881+
description: The definition of `ShiftData` object.
35882+
properties:
35883+
attributes:
35884+
$ref: '#/components/schemas/ShiftDataAttributes'
35885+
id:
35886+
description: The `ShiftData` `id`.
35887+
type: string
35888+
relationships:
35889+
$ref: '#/components/schemas/ShiftDataRelationships'
35890+
type:
35891+
$ref: '#/components/schemas/ShiftDataType'
35892+
required:
35893+
- type
35894+
type: object
35895+
ShiftDataAttributes:
35896+
description: The definition of `ShiftDataAttributes` object.
35897+
properties:
35898+
end:
35899+
description: The end time of the shift.
35900+
format: date-time
35901+
type: string
35902+
start:
35903+
description: The start time of the shift.
35904+
format: date-time
35905+
type: string
35906+
type: object
35907+
ShiftDataRelationships:
35908+
description: The definition of `ShiftDataRelationships` object.
35909+
properties:
35910+
user:
35911+
$ref: '#/components/schemas/ShiftDataRelationshipsUser'
35912+
type: object
35913+
ShiftDataRelationshipsUser:
35914+
description: The definition of `ShiftDataRelationshipsUser` object.
35915+
properties:
35916+
data:
35917+
$ref: '#/components/schemas/ShiftDataRelationshipsUserData'
35918+
required:
35919+
- data
35920+
type: object
35921+
ShiftDataRelationshipsUserData:
35922+
description: The definition of `ShiftDataRelationshipsUserData` object.
35923+
properties:
35924+
id:
35925+
description: The user's ID.
35926+
example: 00000000-0000-0000-0000-000000000000
35927+
type: string
35928+
type:
35929+
$ref: '#/components/schemas/ShiftDataRelationshipsUserDataType'
35930+
required:
35931+
- type
35932+
- id
35933+
type: object
35934+
ShiftDataRelationshipsUserDataType:
35935+
default: users
35936+
description: Users resource type.
35937+
enum:
35938+
- users
35939+
example: users
35940+
type: string
35941+
x-enum-varnames:
35942+
- USERS
35943+
ShiftDataType:
35944+
default: shifts
35945+
description: Shifts resource type.
35946+
enum:
35947+
- shifts
35948+
example: shifts
35949+
type: string
35950+
x-enum-varnames:
35951+
- SHIFTS
35952+
ShiftIncluded:
35953+
description: The definition of `ShiftIncluded` object.
35954+
oneOf:
35955+
- $ref: '#/components/schemas/ScheduleUser'
3585035956
SingleAggregatedConnectionResponseArray:
3585135957
description: List of aggregated connections.
3585235958
example:
@@ -51464,6 +51570,48 @@ paths:
5146451570
summary: Update on-call schedule
5146551571
tags:
5146651572
- On-Call
51573+
/api/v2/on-call/schedules/{schedule_id}/on-call:
51574+
get:
51575+
description: Get an on-call user for a schedule
51576+
operationId: GetScheduleOnCallUser
51577+
parameters:
51578+
- description: 'Comma-separated list of included relationships to be returned.
51579+
Allowed values: `user`.'
51580+
in: query
51581+
name: include
51582+
schema:
51583+
type: string
51584+
- description: The UUID of the schedule
51585+
in: path
51586+
name: schedule_id
51587+
required: true
51588+
schema:
51589+
example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d
51590+
type: string
51591+
- description: The timestamp to get the on-call user for
51592+
in: query
51593+
name: filter[at_ts]
51594+
schema:
51595+
example: '2025-05-07T02:53:01Z'
51596+
type: string
51597+
responses:
51598+
'200':
51599+
content:
51600+
application/json:
51601+
schema:
51602+
$ref: '#/components/schemas/Shift'
51603+
description: OK
51604+
'204':
51605+
description: No Content
51606+
'429':
51607+
$ref: '#/components/responses/TooManyRequestsResponse'
51608+
security:
51609+
- apiKeyAuth: []
51610+
appKeyAuth: []
51611+
- AuthZ: []
51612+
summary: Get schedule on call user
51613+
tags:
51614+
- On-Call
5146751615
/api/v2/on-call/teams/{team_id}/routing-rules:
5146851616
get:
5146951617
description: Get a team's on-call routing rules

docs/datadog_api_client.v2.model.rst

+63
Original file line numberDiff line numberDiff line change
@@ -15509,6 +15509,69 @@ datadog\_api\_client.v2.model.service\_now\_ticket\_result module
1550915509
:members:
1551015510
:show-inheritance:
1551115511

15512+
datadog\_api\_client.v2.model.shift module
15513+
------------------------------------------
15514+
15515+
.. automodule:: datadog_api_client.v2.model.shift
15516+
:members:
15517+
:show-inheritance:
15518+
15519+
datadog\_api\_client.v2.model.shift\_data module
15520+
------------------------------------------------
15521+
15522+
.. automodule:: datadog_api_client.v2.model.shift_data
15523+
:members:
15524+
:show-inheritance:
15525+
15526+
datadog\_api\_client.v2.model.shift\_data\_attributes module
15527+
------------------------------------------------------------
15528+
15529+
.. automodule:: datadog_api_client.v2.model.shift_data_attributes
15530+
:members:
15531+
:show-inheritance:
15532+
15533+
datadog\_api\_client.v2.model.shift\_data\_relationships module
15534+
---------------------------------------------------------------
15535+
15536+
.. automodule:: datadog_api_client.v2.model.shift_data_relationships
15537+
:members:
15538+
:show-inheritance:
15539+
15540+
datadog\_api\_client.v2.model.shift\_data\_relationships\_user module
15541+
---------------------------------------------------------------------
15542+
15543+
.. automodule:: datadog_api_client.v2.model.shift_data_relationships_user
15544+
:members:
15545+
:show-inheritance:
15546+
15547+
datadog\_api\_client.v2.model.shift\_data\_relationships\_user\_data module
15548+
---------------------------------------------------------------------------
15549+
15550+
.. automodule:: datadog_api_client.v2.model.shift_data_relationships_user_data
15551+
:members:
15552+
:show-inheritance:
15553+
15554+
datadog\_api\_client.v2.model.shift\_data\_relationships\_user\_data\_type module
15555+
---------------------------------------------------------------------------------
15556+
15557+
.. automodule:: datadog_api_client.v2.model.shift_data_relationships_user_data_type
15558+
:members:
15559+
:show-inheritance:
15560+
15561+
datadog\_api\_client.v2.model.shift\_data\_type module
15562+
------------------------------------------------------
15563+
15564+
.. automodule:: datadog_api_client.v2.model.shift_data_type
15565+
:members:
15566+
:show-inheritance:
15567+
15568+
datadog\_api\_client.v2.model.shift\_included module
15569+
----------------------------------------------------
15570+
15571+
.. automodule:: datadog_api_client.v2.model.shift_included
15572+
:members:
15573+
:show-inheritance:
15574+
1551215575
datadog\_api\_client.v2.model.single\_aggregated\_connection\_response\_array module
1551315576
------------------------------------------------------------------------------------
1551415577

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Get schedule on call user returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.on_call_api import OnCallApi
8+
9+
# there is a valid "schedule" in the system
10+
SCHEDULE_DATA_ID = environ["SCHEDULE_DATA_ID"]
11+
12+
configuration = Configuration()
13+
with ApiClient(configuration) as api_client:
14+
api_instance = OnCallApi(api_client)
15+
response = api_instance.get_schedule_on_call_user(
16+
schedule_id=SCHEDULE_DATA_ID,
17+
)
18+
19+
print(response)

src/datadog_api_client/v2/api/on_call_api.py

+64
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from datadog_api_client.v2.model.schedule import Schedule
1818
from datadog_api_client.v2.model.schedule_create_request import ScheduleCreateRequest
1919
from datadog_api_client.v2.model.schedule_update_request import ScheduleUpdateRequest
20+
from datadog_api_client.v2.model.shift import Shift
2021
from datadog_api_client.v2.model.team_routing_rules import TeamRoutingRules
2122
from datadog_api_client.v2.model.team_routing_rules_request import TeamRoutingRulesRequest
2223

@@ -212,6 +213,39 @@ def __init__(self, api_client=None):
212213
api_client=api_client,
213214
)
214215

216+
self._get_schedule_on_call_user_endpoint = _Endpoint(
217+
settings={
218+
"response_type": (Shift,),
219+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
220+
"endpoint_path": "/api/v2/on-call/schedules/{schedule_id}/on-call",
221+
"operation_id": "get_schedule_on_call_user",
222+
"http_method": "GET",
223+
"version": "v2",
224+
},
225+
params_map={
226+
"include": {
227+
"openapi_types": (str,),
228+
"attribute": "include",
229+
"location": "query",
230+
},
231+
"schedule_id": {
232+
"required": True,
233+
"openapi_types": (str,),
234+
"attribute": "schedule_id",
235+
"location": "path",
236+
},
237+
"filter_at_ts": {
238+
"openapi_types": (str,),
239+
"attribute": "filter[at_ts]",
240+
"location": "query",
241+
},
242+
},
243+
headers_map={
244+
"accept": ["*/*"],
245+
},
246+
api_client=api_client,
247+
)
248+
215249
self._set_on_call_team_routing_rules_endpoint = _Endpoint(
216250
settings={
217251
"response_type": (TeamRoutingRules,),
@@ -457,6 +491,36 @@ def get_on_call_team_routing_rules(
457491

458492
return self._get_on_call_team_routing_rules_endpoint.call_with_http_info(**kwargs)
459493

494+
def get_schedule_on_call_user(
495+
self,
496+
schedule_id: str,
497+
*,
498+
include: Union[str, UnsetType] = unset,
499+
filter_at_ts: Union[str, UnsetType] = unset,
500+
) -> Shift:
501+
"""Get schedule on call user.
502+
503+
Get an on-call user for a schedule
504+
505+
:param schedule_id: The UUID of the schedule
506+
:type schedule_id: str
507+
:param include: Comma-separated list of included relationships to be returned. Allowed values: ``user``.
508+
:type include: str, optional
509+
:param filter_at_ts: The timestamp to get the on-call user for
510+
:type filter_at_ts: str, optional
511+
:rtype: Shift
512+
"""
513+
kwargs: Dict[str, Any] = {}
514+
if include is not unset:
515+
kwargs["include"] = include
516+
517+
kwargs["schedule_id"] = schedule_id
518+
519+
if filter_at_ts is not unset:
520+
kwargs["filter_at_ts"] = filter_at_ts
521+
522+
return self._get_schedule_on_call_user_endpoint.call_with_http_info(**kwargs)
523+
460524
def set_on_call_team_routing_rules(
461525
self,
462526
team_id: str,

0 commit comments

Comments
 (0)