Skip to content

incident_io_client.api.custom_fields_v2.custom_fields_v2_create

asyncio async

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

Create Custom Fields V2

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV2CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

CustomFieldsV2CreateResponseBody

Source code in incident_io_client/api/custom_fields_v2/custom_fields_v2_create.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV2CreateRequestBody,
) -> Optional[CustomFieldsV2CreateResponseBody]:
    """Create Custom Fields V2

     Create a new custom field

    Args:
        body (CustomFieldsV2CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

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

asyncio_detailed async

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

Create Custom Fields V2

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV2CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

Response[CustomFieldsV2CreateResponseBody]

Source code in incident_io_client/api/custom_fields_v2/custom_fields_v2_create.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV2CreateRequestBody,
) -> Response[CustomFieldsV2CreateResponseBody]:
    """Create Custom Fields V2

     Create a new custom field

    Args:
        body (CustomFieldsV2CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

    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: CustomFieldsV2CreateRequestBody
) -> Optional[CustomFieldsV2CreateResponseBody]

Create Custom Fields V2

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV2CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

CustomFieldsV2CreateResponseBody

Source code in incident_io_client/api/custom_fields_v2/custom_fields_v2_create.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV2CreateRequestBody,
) -> Optional[CustomFieldsV2CreateResponseBody]:
    """Create Custom Fields V2

     Create a new custom field

    Args:
        body (CustomFieldsV2CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

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

sync_detailed

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

Create Custom Fields V2

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV2CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

Response[CustomFieldsV2CreateResponseBody]

Source code in incident_io_client/api/custom_fields_v2/custom_fields_v2_create.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV2CreateRequestBody,
) -> Response[CustomFieldsV2CreateResponseBody]:
    """Create Custom Fields V2

     Create a new custom field

    Args:
        body (CustomFieldsV2CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)