Skip to content

incident_io_client.api.catalog_v2.catalog_v2_update_type_schema

asyncio async

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

UpdateTypeSchema Catalog V2

Update an existing catalog types schema, adding or removing attributes.

Updating the schema is handled separately from creating and updating types, so that you don't have to worry about dependencies between types. For example, if type A has an attribute that relies on type B, you would have to create type B first.

By allowing the creation of types without a schema, they can be created in any order, but it means that you need to make a separate call to this endpoint to update the schema.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeSchemaRequestBody

Example: {'attributes': [{'array': False, 'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual', 'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}], 'version': 1}.

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

CatalogV2UpdateTypeSchemaResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type_schema.py
async def asyncio(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeSchemaRequestBody,
) -> Optional[CatalogV2UpdateTypeSchemaResponseBody]:
    """UpdateTypeSchema Catalog V2

     Update an existing catalog types schema, adding or removing attributes.

    Updating the schema is handled separately from creating and updating types, so that you don't
    have to worry about dependencies between types. For example, if type A has an attribute that
    relies on type B, you would have to create type B first.

    By allowing the creation of types without a schema, they can be created in any order, but it
    means that you need to make a separate call to this endpoint to update the schema.

    Args:
        id (str):
        body (CatalogV2UpdateTypeSchemaRequestBody):  Example: {'attributes': [{'array': False,
            'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual',
            'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}],
            'version': 1}.

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

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

asyncio_detailed async

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

UpdateTypeSchema Catalog V2

Update an existing catalog types schema, adding or removing attributes.

Updating the schema is handled separately from creating and updating types, so that you don't have to worry about dependencies between types. For example, if type A has an attribute that relies on type B, you would have to create type B first.

By allowing the creation of types without a schema, they can be created in any order, but it means that you need to make a separate call to this endpoint to update the schema.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeSchemaRequestBody

Example: {'attributes': [{'array': False, 'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual', 'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}], 'version': 1}.

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

Response[CatalogV2UpdateTypeSchemaResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type_schema.py
async def asyncio_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeSchemaRequestBody,
) -> Response[CatalogV2UpdateTypeSchemaResponseBody]:
    """UpdateTypeSchema Catalog V2

     Update an existing catalog types schema, adding or removing attributes.

    Updating the schema is handled separately from creating and updating types, so that you don't
    have to worry about dependencies between types. For example, if type A has an attribute that
    relies on type B, you would have to create type B first.

    By allowing the creation of types without a schema, they can be created in any order, but it
    means that you need to make a separate call to this endpoint to update the schema.

    Args:
        id (str):
        body (CatalogV2UpdateTypeSchemaRequestBody):  Example: {'attributes': [{'array': False,
            'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual',
            'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}],
            'version': 1}.

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

    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: CatalogV2UpdateTypeSchemaRequestBody
) -> Optional[CatalogV2UpdateTypeSchemaResponseBody]

UpdateTypeSchema Catalog V2

Update an existing catalog types schema, adding or removing attributes.

Updating the schema is handled separately from creating and updating types, so that you don't have to worry about dependencies between types. For example, if type A has an attribute that relies on type B, you would have to create type B first.

By allowing the creation of types without a schema, they can be created in any order, but it means that you need to make a separate call to this endpoint to update the schema.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeSchemaRequestBody

Example: {'attributes': [{'array': False, 'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual', 'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}], 'version': 1}.

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

CatalogV2UpdateTypeSchemaResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type_schema.py
def sync(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeSchemaRequestBody,
) -> Optional[CatalogV2UpdateTypeSchemaResponseBody]:
    """UpdateTypeSchema Catalog V2

     Update an existing catalog types schema, adding or removing attributes.

    Updating the schema is handled separately from creating and updating types, so that you don't
    have to worry about dependencies between types. For example, if type A has an attribute that
    relies on type B, you would have to create type B first.

    By allowing the creation of types without a schema, they can be created in any order, but it
    means that you need to make a separate call to this endpoint to update the schema.

    Args:
        id (str):
        body (CatalogV2UpdateTypeSchemaRequestBody):  Example: {'attributes': [{'array': False,
            'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual',
            'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}],
            'version': 1}.

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

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

sync_detailed

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

UpdateTypeSchema Catalog V2

Update an existing catalog types schema, adding or removing attributes.

Updating the schema is handled separately from creating and updating types, so that you don't have to worry about dependencies between types. For example, if type A has an attribute that relies on type B, you would have to create type B first.

By allowing the creation of types without a schema, they can be created in any order, but it means that you need to make a separate call to this endpoint to update the schema.

Parameters:

Name Type Description Default
id str
required
body CatalogV2UpdateTypeSchemaRequestBody

Example: {'attributes': [{'array': False, 'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual', 'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}], 'version': 1}.

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

Response[CatalogV2UpdateTypeSchemaResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_update_type_schema.py
def sync_detailed(
    id: str,
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2UpdateTypeSchemaRequestBody,
) -> Response[CatalogV2UpdateTypeSchemaResponseBody]:
    """UpdateTypeSchema Catalog V2

     Update an existing catalog types schema, adding or removing attributes.

    Updating the schema is handled separately from creating and updating types, so that you don't
    have to worry about dependencies between types. For example, if type A has an attribute that
    relies on type B, you would have to create type B first.

    By allowing the creation of types without a schema, they can be created in any order, but it
    means that you need to make a separate call to this endpoint to update the schema.

    Args:
        id (str):
        body (CatalogV2UpdateTypeSchemaRequestBody):  Example: {'attributes': [{'array': False,
            'backlink_attribute': 'abc123', 'id': '01GW2G3V0S59R238FAHPDS1R66', 'mode': 'manual',
            'name': 'tier', 'path': [{'attribute_id': 'abc123'}], 'type': 'Custom["Service"]'}],
            'version': 1}.

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

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

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

    return _build_response(client=client, response=response)