Skip to content

incident_io_client.api.custom_field_options_v1.custom_field_options_v1_create

asyncio async

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

Create Custom Field Options V1

Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option appears near the end of the list.

Parameters:

Name Type Description Default
body CustomFieldOptionsV1CreateRequestBody

Example: {'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

CustomFieldOptionsV1CreateResponseBody

Source code in incident_io_client/api/custom_field_options_v1/custom_field_options_v1_create.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldOptionsV1CreateRequestBody,
) -> Optional[CustomFieldOptionsV1CreateResponseBody]:
    """Create Custom Field Options V1

     Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option
    appears near the end of the list.

    Args:
        body (CustomFieldOptionsV1CreateRequestBody):  Example: {'custom_field_id':
            '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

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

asyncio_detailed async

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

Create Custom Field Options V1

Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option appears near the end of the list.

Parameters:

Name Type Description Default
body CustomFieldOptionsV1CreateRequestBody

Example: {'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

Response[CustomFieldOptionsV1CreateResponseBody]

Source code in incident_io_client/api/custom_field_options_v1/custom_field_options_v1_create.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldOptionsV1CreateRequestBody,
) -> Response[CustomFieldOptionsV1CreateResponseBody]:
    """Create Custom Field Options V1

     Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option
    appears near the end of the list.

    Args:
        body (CustomFieldOptionsV1CreateRequestBody):  Example: {'custom_field_id':
            '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

    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: CustomFieldOptionsV1CreateRequestBody
) -> Optional[CustomFieldOptionsV1CreateResponseBody]

Create Custom Field Options V1

Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option appears near the end of the list.

Parameters:

Name Type Description Default
body CustomFieldOptionsV1CreateRequestBody

Example: {'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

CustomFieldOptionsV1CreateResponseBody

Source code in incident_io_client/api/custom_field_options_v1/custom_field_options_v1_create.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldOptionsV1CreateRequestBody,
) -> Optional[CustomFieldOptionsV1CreateResponseBody]:
    """Create Custom Field Options V1

     Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option
    appears near the end of the list.

    Args:
        body (CustomFieldOptionsV1CreateRequestBody):  Example: {'custom_field_id':
            '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

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

sync_detailed

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

Create Custom Field Options V1

Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option appears near the end of the list.

Parameters:

Name Type Description Default
body CustomFieldOptionsV1CreateRequestBody

Example: {'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

Response[CustomFieldOptionsV1CreateResponseBody]

Source code in incident_io_client/api/custom_field_options_v1/custom_field_options_v1_create.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldOptionsV1CreateRequestBody,
) -> Response[CustomFieldOptionsV1CreateResponseBody]:
    """Create Custom Field Options V1

     Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option
    appears near the end of the list.

    Args:
        body (CustomFieldOptionsV1CreateRequestBody):  Example: {'custom_field_id':
            '01FCNDV6P870EA6S7TK1DSYDG0', 'sort_key': 10, 'value': 'Product'}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)