Skip to content

incident_io_client.api.custom_fields_v1.custom_fields_v1_create

asyncio async

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

Create Custom Fields V1

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV1CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required': 'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation': True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

CustomFieldsV1CreateResponseBody

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_create.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1CreateRequestBody,
) -> Optional[CustomFieldsV1CreateResponseBody]:
    """Create Custom Fields V1

     Create a new custom field

    Args:
        body (CustomFieldsV1CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required':
            'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation':
            True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

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

asyncio_detailed async

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

Create Custom Fields V1

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV1CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required': 'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation': True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

Response[CustomFieldsV1CreateResponseBody]

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_create.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1CreateRequestBody,
) -> Response[CustomFieldsV1CreateResponseBody]:
    """Create Custom Fields V1

     Create a new custom field

    Args:
        body (CustomFieldsV1CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required':
            'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation':
            True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

    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: CustomFieldsV1CreateRequestBody
) -> Optional[CustomFieldsV1CreateResponseBody]

Create Custom Fields V1

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV1CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required': 'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation': True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

CustomFieldsV1CreateResponseBody

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_create.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1CreateRequestBody,
) -> Optional[CustomFieldsV1CreateResponseBody]:
    """Create Custom Fields V1

     Create a new custom field

    Args:
        body (CustomFieldsV1CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required':
            'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation':
            True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

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

sync_detailed

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

Create Custom Fields V1

Create a new custom field

Parameters:

Name Type Description Default
body CustomFieldsV1CreateRequestBody

Example: {'description': 'Which team is impacted by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required': 'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation': True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

Response[CustomFieldsV1CreateResponseBody]

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_create.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1CreateRequestBody,
) -> Response[CustomFieldsV1CreateResponseBody]:
    """Create Custom Fields V1

     Create a new custom field

    Args:
        body (CustomFieldsV1CreateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', 'field_type': 'single_select', 'name': 'Affected Team', 'required':
            'never', 'required_v2': 'never', 'show_before_closure': True, 'show_before_creation':
            True, 'show_before_update': True, 'show_in_announcement_post': True}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)