Skip to content

incident_io_client.api.incidents_v1.incidents_v1_list

asyncio async

asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET
) -> Optional[IncidentsV1ListResponseBody]

List Incidents V1

List all incidents for an organisation.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET
status Union[Unset, List[str]]
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[IncidentsV1ListResponseBody]

IncidentsV1ListResponseBody

Source code in incident_io_client/api/incidents_v1/incidents_v1_list.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET,
) -> Optional[IncidentsV1ListResponseBody]:
    """List Incidents V1

     List all incidents for an organisation.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):
        status (Union[Unset, List[str]]):

    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:
        IncidentsV1ListResponseBody
    """

    return (
        await asyncio_detailed(
            client=client,
            page_size=page_size,
            after=after,
            status=status,
        )
    ).parsed

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET
) -> Response[IncidentsV1ListResponseBody]

List Incidents V1

List all incidents for an organisation.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET
status Union[Unset, List[str]]
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[IncidentsV1ListResponseBody]

Response[IncidentsV1ListResponseBody]

Source code in incident_io_client/api/incidents_v1/incidents_v1_list.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET,
) -> Response[IncidentsV1ListResponseBody]:
    """List Incidents V1

     List all incidents for an organisation.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):
        status (Union[Unset, List[str]]):

    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[IncidentsV1ListResponseBody]
    """

    kwargs = _get_kwargs(
        page_size=page_size,
        after=after,
        status=status,
    )

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

    return _build_response(client=client, response=response)

sync

sync(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET
) -> Optional[IncidentsV1ListResponseBody]

List Incidents V1

List all incidents for an organisation.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET
status Union[Unset, List[str]]
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[IncidentsV1ListResponseBody]

IncidentsV1ListResponseBody

Source code in incident_io_client/api/incidents_v1/incidents_v1_list.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET,
) -> Optional[IncidentsV1ListResponseBody]:
    """List Incidents V1

     List all incidents for an organisation.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):
        status (Union[Unset, List[str]]):

    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:
        IncidentsV1ListResponseBody
    """

    return sync_detailed(
        client=client,
        page_size=page_size,
        after=after,
        status=status,
    ).parsed

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET
) -> Response[IncidentsV1ListResponseBody]

List Incidents V1

List all incidents for an organisation.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET
status Union[Unset, List[str]]
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[IncidentsV1ListResponseBody]

Response[IncidentsV1ListResponseBody]

Source code in incident_io_client/api/incidents_v1/incidents_v1_list.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
    status: Union[Unset, List[str]] = UNSET,
) -> Response[IncidentsV1ListResponseBody]:
    """List Incidents V1

     List all incidents for an organisation.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):
        status (Union[Unset, List[str]]):

    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[IncidentsV1ListResponseBody]
    """

    kwargs = _get_kwargs(
        page_size=page_size,
        after=after,
        status=status,
    )

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

    return _build_response(client=client, response=response)