Skip to content

incident_io_client.api.schedules_v2.schedules_v2_list_schedule_entries

asyncio async

asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[
        Unset, datetime.datetime
    ] = UNSET,
    entry_window_end: Union[
        Unset, datetime.datetime
    ] = UNSET
) -> Optional[SchedulesV2ListScheduleEntriesResponseBody]

ListScheduleEntries Schedules V2

Get a list of schedule entries. The endpoint will return all entries that overlap with the given window, if one is provided.

Parameters:

Name Type Description Default
schedule_id str
required
entry_window_start Union[Unset, datetime]
UNSET
entry_window_end Union[Unset, datetime]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[SchedulesV2ListScheduleEntriesResponseBody]

SchedulesV2ListScheduleEntriesResponseBody

Source code in incident_io_client/api/schedules_v2/schedules_v2_list_schedule_entries.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[Unset, datetime.datetime] = UNSET,
    entry_window_end: Union[Unset, datetime.datetime] = UNSET,
) -> Optional[SchedulesV2ListScheduleEntriesResponseBody]:
    """ListScheduleEntries Schedules V2

     Get a list of schedule entries. The endpoint will return all entries that overlap with the given
    window, if one is provided.

    Args:
        schedule_id (str):
        entry_window_start (Union[Unset, datetime.datetime]):
        entry_window_end (Union[Unset, datetime.datetime]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        SchedulesV2ListScheduleEntriesResponseBody
    """

    return (
        await asyncio_detailed(
            client=client,
            schedule_id=schedule_id,
            entry_window_start=entry_window_start,
            entry_window_end=entry_window_end,
        )
    ).parsed

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[
        Unset, datetime.datetime
    ] = UNSET,
    entry_window_end: Union[
        Unset, datetime.datetime
    ] = UNSET
) -> Response[SchedulesV2ListScheduleEntriesResponseBody]

ListScheduleEntries Schedules V2

Get a list of schedule entries. The endpoint will return all entries that overlap with the given window, if one is provided.

Parameters:

Name Type Description Default
schedule_id str
required
entry_window_start Union[Unset, datetime]
UNSET
entry_window_end Union[Unset, datetime]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[SchedulesV2ListScheduleEntriesResponseBody]

Response[SchedulesV2ListScheduleEntriesResponseBody]

Source code in incident_io_client/api/schedules_v2/schedules_v2_list_schedule_entries.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[Unset, datetime.datetime] = UNSET,
    entry_window_end: Union[Unset, datetime.datetime] = UNSET,
) -> Response[SchedulesV2ListScheduleEntriesResponseBody]:
    """ListScheduleEntries Schedules V2

     Get a list of schedule entries. The endpoint will return all entries that overlap with the given
    window, if one is provided.

    Args:
        schedule_id (str):
        entry_window_start (Union[Unset, datetime.datetime]):
        entry_window_end (Union[Unset, datetime.datetime]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[SchedulesV2ListScheduleEntriesResponseBody]
    """

    kwargs = _get_kwargs(
        schedule_id=schedule_id,
        entry_window_start=entry_window_start,
        entry_window_end=entry_window_end,
    )

    response = await client.get_async_httpx_client().request(**kwargs)

    return _build_response(client=client, response=response)

sync

sync(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[
        Unset, datetime.datetime
    ] = UNSET,
    entry_window_end: Union[
        Unset, datetime.datetime
    ] = UNSET
) -> Optional[SchedulesV2ListScheduleEntriesResponseBody]

ListScheduleEntries Schedules V2

Get a list of schedule entries. The endpoint will return all entries that overlap with the given window, if one is provided.

Parameters:

Name Type Description Default
schedule_id str
required
entry_window_start Union[Unset, datetime]
UNSET
entry_window_end Union[Unset, datetime]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[SchedulesV2ListScheduleEntriesResponseBody]

SchedulesV2ListScheduleEntriesResponseBody

Source code in incident_io_client/api/schedules_v2/schedules_v2_list_schedule_entries.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[Unset, datetime.datetime] = UNSET,
    entry_window_end: Union[Unset, datetime.datetime] = UNSET,
) -> Optional[SchedulesV2ListScheduleEntriesResponseBody]:
    """ListScheduleEntries Schedules V2

     Get a list of schedule entries. The endpoint will return all entries that overlap with the given
    window, if one is provided.

    Args:
        schedule_id (str):
        entry_window_start (Union[Unset, datetime.datetime]):
        entry_window_end (Union[Unset, datetime.datetime]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        SchedulesV2ListScheduleEntriesResponseBody
    """

    return sync_detailed(
        client=client,
        schedule_id=schedule_id,
        entry_window_start=entry_window_start,
        entry_window_end=entry_window_end,
    ).parsed

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[
        Unset, datetime.datetime
    ] = UNSET,
    entry_window_end: Union[
        Unset, datetime.datetime
    ] = UNSET
) -> Response[SchedulesV2ListScheduleEntriesResponseBody]

ListScheduleEntries Schedules V2

Get a list of schedule entries. The endpoint will return all entries that overlap with the given window, if one is provided.

Parameters:

Name Type Description Default
schedule_id str
required
entry_window_start Union[Unset, datetime]
UNSET
entry_window_end Union[Unset, datetime]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[SchedulesV2ListScheduleEntriesResponseBody]

Response[SchedulesV2ListScheduleEntriesResponseBody]

Source code in incident_io_client/api/schedules_v2/schedules_v2_list_schedule_entries.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    schedule_id: str,
    entry_window_start: Union[Unset, datetime.datetime] = UNSET,
    entry_window_end: Union[Unset, datetime.datetime] = UNSET,
) -> Response[SchedulesV2ListScheduleEntriesResponseBody]:
    """ListScheduleEntries Schedules V2

     Get a list of schedule entries. The endpoint will return all entries that overlap with the given
    window, if one is provided.

    Args:
        schedule_id (str):
        entry_window_start (Union[Unset, datetime.datetime]):
        entry_window_end (Union[Unset, datetime.datetime]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[SchedulesV2ListScheduleEntriesResponseBody]
    """

    kwargs = _get_kwargs(
        schedule_id=schedule_id,
        entry_window_start=entry_window_start,
        entry_window_end=entry_window_end,
    )

    response = client.get_httpx_client().request(
        **kwargs,
    )

    return _build_response(client=client, response=response)