Skip to content

incident_io_client.api.incident_attachments_v1.incident_attachments_v1_list

asyncio async

asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[
        Unset, IncidentAttachmentsV1ListResourceType
    ] = UNSET
) -> Optional[IncidentAttachmentsV1ListResponseBody]

List Incident Attachments V1

List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.

Parameters:

Name Type Description Default
incident_id Union[Unset, str]
UNSET
external_id Union[Unset, str]
UNSET
resource_type Union[Unset, IncidentAttachmentsV1ListResourceType]
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[IncidentAttachmentsV1ListResponseBody]

IncidentAttachmentsV1ListResponseBody

Source code in incident_io_client/api/incident_attachments_v1/incident_attachments_v1_list.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[Unset, IncidentAttachmentsV1ListResourceType] = UNSET,
) -> Optional[IncidentAttachmentsV1ListResponseBody]:
    """List Incident Attachments V1

     List all incident attachements for a given external resource or incident. You must provide either a
    specific incident ID or a specific external resource type and external ID.

    Args:
        incident_id (Union[Unset, str]):
        external_id (Union[Unset, str]):
        resource_type (Union[Unset, IncidentAttachmentsV1ListResourceType]):

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

    return (
        await asyncio_detailed(
            client=client,
            incident_id=incident_id,
            external_id=external_id,
            resource_type=resource_type,
        )
    ).parsed

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[
        Unset, IncidentAttachmentsV1ListResourceType
    ] = UNSET
) -> Response[IncidentAttachmentsV1ListResponseBody]

List Incident Attachments V1

List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.

Parameters:

Name Type Description Default
incident_id Union[Unset, str]
UNSET
external_id Union[Unset, str]
UNSET
resource_type Union[Unset, IncidentAttachmentsV1ListResourceType]
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[IncidentAttachmentsV1ListResponseBody]

Response[IncidentAttachmentsV1ListResponseBody]

Source code in incident_io_client/api/incident_attachments_v1/incident_attachments_v1_list.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[Unset, IncidentAttachmentsV1ListResourceType] = UNSET,
) -> Response[IncidentAttachmentsV1ListResponseBody]:
    """List Incident Attachments V1

     List all incident attachements for a given external resource or incident. You must provide either a
    specific incident ID or a specific external resource type and external ID.

    Args:
        incident_id (Union[Unset, str]):
        external_id (Union[Unset, str]):
        resource_type (Union[Unset, IncidentAttachmentsV1ListResourceType]):

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

    kwargs = _get_kwargs(
        incident_id=incident_id,
        external_id=external_id,
        resource_type=resource_type,
    )

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

    return _build_response(client=client, response=response)

sync

sync(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[
        Unset, IncidentAttachmentsV1ListResourceType
    ] = UNSET
) -> Optional[IncidentAttachmentsV1ListResponseBody]

List Incident Attachments V1

List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.

Parameters:

Name Type Description Default
incident_id Union[Unset, str]
UNSET
external_id Union[Unset, str]
UNSET
resource_type Union[Unset, IncidentAttachmentsV1ListResourceType]
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[IncidentAttachmentsV1ListResponseBody]

IncidentAttachmentsV1ListResponseBody

Source code in incident_io_client/api/incident_attachments_v1/incident_attachments_v1_list.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[Unset, IncidentAttachmentsV1ListResourceType] = UNSET,
) -> Optional[IncidentAttachmentsV1ListResponseBody]:
    """List Incident Attachments V1

     List all incident attachements for a given external resource or incident. You must provide either a
    specific incident ID or a specific external resource type and external ID.

    Args:
        incident_id (Union[Unset, str]):
        external_id (Union[Unset, str]):
        resource_type (Union[Unset, IncidentAttachmentsV1ListResourceType]):

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

    return sync_detailed(
        client=client,
        incident_id=incident_id,
        external_id=external_id,
        resource_type=resource_type,
    ).parsed

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[
        Unset, IncidentAttachmentsV1ListResourceType
    ] = UNSET
) -> Response[IncidentAttachmentsV1ListResponseBody]

List Incident Attachments V1

List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.

Parameters:

Name Type Description Default
incident_id Union[Unset, str]
UNSET
external_id Union[Unset, str]
UNSET
resource_type Union[Unset, IncidentAttachmentsV1ListResourceType]
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[IncidentAttachmentsV1ListResponseBody]

Response[IncidentAttachmentsV1ListResponseBody]

Source code in incident_io_client/api/incident_attachments_v1/incident_attachments_v1_list.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    incident_id: Union[Unset, str] = UNSET,
    external_id: Union[Unset, str] = UNSET,
    resource_type: Union[Unset, IncidentAttachmentsV1ListResourceType] = UNSET,
) -> Response[IncidentAttachmentsV1ListResponseBody]:
    """List Incident Attachments V1

     List all incident attachements for a given external resource or incident. You must provide either a
    specific incident ID or a specific external resource type and external ID.

    Args:
        incident_id (Union[Unset, str]):
        external_id (Union[Unset, str]):
        resource_type (Union[Unset, IncidentAttachmentsV1ListResourceType]):

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

    kwargs = _get_kwargs(
        incident_id=incident_id,
        external_id=external_id,
        resource_type=resource_type,
    )

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

    return _build_response(client=client, response=response)