Skip to content

incident_io_client.api.incident_statuses_v1.incident_statuses_v1_create

asyncio async

asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody
) -> Optional[IncidentStatusesV1CreateResponseBody]

Create Incident Statuses V1

Create a new incident status

Parameters:

Name Type Description Default
body IncidentStatusesV1CreateRequestBody

Example: {'category': 'live', 'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

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[IncidentStatusesV1CreateResponseBody]

IncidentStatusesV1CreateResponseBody

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_create.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody,
) -> Optional[IncidentStatusesV1CreateResponseBody]:
    """Create Incident Statuses V1

     Create a new incident status

    Args:
        body (IncidentStatusesV1CreateRequestBody):  Example: {'category': 'live', 'description':
            "Impact has been **fully mitigated**, and we're ready to learn from this incident.",
            'name': 'Closed'}.

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

    return (
        await asyncio_detailed(
            client=client,
            body=body,
        )
    ).parsed

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody
) -> Response[IncidentStatusesV1CreateResponseBody]

Create Incident Statuses V1

Create a new incident status

Parameters:

Name Type Description Default
body IncidentStatusesV1CreateRequestBody

Example: {'category': 'live', 'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

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[IncidentStatusesV1CreateResponseBody]

Response[IncidentStatusesV1CreateResponseBody]

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_create.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody,
) -> Response[IncidentStatusesV1CreateResponseBody]:
    """Create Incident Statuses V1

     Create a new incident status

    Args:
        body (IncidentStatusesV1CreateRequestBody):  Example: {'category': 'live', 'description':
            "Impact has been **fully mitigated**, and we're ready to learn from this incident.",
            'name': 'Closed'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync

sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody
) -> Optional[IncidentStatusesV1CreateResponseBody]

Create Incident Statuses V1

Create a new incident status

Parameters:

Name Type Description Default
body IncidentStatusesV1CreateRequestBody

Example: {'category': 'live', 'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

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[IncidentStatusesV1CreateResponseBody]

IncidentStatusesV1CreateResponseBody

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_create.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody,
) -> Optional[IncidentStatusesV1CreateResponseBody]:
    """Create Incident Statuses V1

     Create a new incident status

    Args:
        body (IncidentStatusesV1CreateRequestBody):  Example: {'category': 'live', 'description':
            "Impact has been **fully mitigated**, and we're ready to learn from this incident.",
            'name': 'Closed'}.

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

    return sync_detailed(
        client=client,
        body=body,
    ).parsed

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody
) -> Response[IncidentStatusesV1CreateResponseBody]

Create Incident Statuses V1

Create a new incident status

Parameters:

Name Type Description Default
body IncidentStatusesV1CreateRequestBody

Example: {'category': 'live', 'description': "Impact has been fully mitigated, and we're ready to learn from this incident.", 'name': 'Closed'}.

required

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[IncidentStatusesV1CreateResponseBody]

Response[IncidentStatusesV1CreateResponseBody]

Source code in incident_io_client/api/incident_statuses_v1/incident_statuses_v1_create.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentStatusesV1CreateRequestBody,
) -> Response[IncidentStatusesV1CreateResponseBody]:
    """Create Incident Statuses V1

     Create a new incident status

    Args:
        body (IncidentStatusesV1CreateRequestBody):  Example: {'category': 'live', 'description':
            "Impact has been **fully mitigated**, and we're ready to learn from this incident.",
            'name': 'Closed'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)