Skip to content

incident_io_client.api.custom_fields_v1.custom_fields_v1_update

asyncio async

asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody
) -> Optional[CustomFieldsV1UpdateResponseBody]

Update Custom Fields V1

Update the details of a custom field

Parameters:

Name Type Description Default
id str
required
body CustomFieldsV1UpdateRequestBody

Example: {'description': 'Which team is impacted by this issue', '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[CustomFieldsV1UpdateResponseBody]

CustomFieldsV1UpdateResponseBody

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_update.py
async def asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody,
) -> Optional[CustomFieldsV1UpdateResponseBody]:
    """Update Custom Fields V1

     Update the details of a custom field

    Args:
        id (str):
        body (CustomFieldsV1UpdateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', '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:
        CustomFieldsV1UpdateResponseBody
    """

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

asyncio_detailed async

asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody
) -> Response[CustomFieldsV1UpdateResponseBody]

Update Custom Fields V1

Update the details of a custom field

Parameters:

Name Type Description Default
id str
required
body CustomFieldsV1UpdateRequestBody

Example: {'description': 'Which team is impacted by this issue', '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[CustomFieldsV1UpdateResponseBody]

Response[CustomFieldsV1UpdateResponseBody]

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_update.py
async def asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody,
) -> Response[CustomFieldsV1UpdateResponseBody]:
    """Update Custom Fields V1

     Update the details of a custom field

    Args:
        id (str):
        body (CustomFieldsV1UpdateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', '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[CustomFieldsV1UpdateResponseBody]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync

sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody
) -> Optional[CustomFieldsV1UpdateResponseBody]

Update Custom Fields V1

Update the details of a custom field

Parameters:

Name Type Description Default
id str
required
body CustomFieldsV1UpdateRequestBody

Example: {'description': 'Which team is impacted by this issue', '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[CustomFieldsV1UpdateResponseBody]

CustomFieldsV1UpdateResponseBody

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_update.py
def sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody,
) -> Optional[CustomFieldsV1UpdateResponseBody]:
    """Update Custom Fields V1

     Update the details of a custom field

    Args:
        id (str):
        body (CustomFieldsV1UpdateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', '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:
        CustomFieldsV1UpdateResponseBody
    """

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

sync_detailed

sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody
) -> Response[CustomFieldsV1UpdateResponseBody]

Update Custom Fields V1

Update the details of a custom field

Parameters:

Name Type Description Default
id str
required
body CustomFieldsV1UpdateRequestBody

Example: {'description': 'Which team is impacted by this issue', '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[CustomFieldsV1UpdateResponseBody]

Response[CustomFieldsV1UpdateResponseBody]

Source code in incident_io_client/api/custom_fields_v1/custom_fields_v1_update.py
def sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CustomFieldsV1UpdateRequestBody,
) -> Response[CustomFieldsV1UpdateResponseBody]:
    """Update Custom Fields V1

     Update the details of a custom field

    Args:
        id (str):
        body (CustomFieldsV1UpdateRequestBody):  Example: {'description': 'Which team is impacted
            by this issue', '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[CustomFieldsV1UpdateResponseBody]
    """

    kwargs = _get_kwargs(
        id=id,
        body=body,
    )

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

    return _build_response(client=client, response=response)