Skip to content

incident_io_client.api.catalog_v2.catalog_v2_create_entry

asyncio async

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

CreateEntry Catalog V2

Create an entry within the catalog. We support a maximum of 50,000 entries per type.

Parameters:

Name Type Description Default
body CatalogV2CreateEntryRequestBody

Example: {'aliases': ['lawrence@incident.io', 'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id': '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

CatalogV2CreateEntryResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_entry.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateEntryRequestBody,
) -> Optional[CatalogV2CreateEntryResponseBody]:
    """CreateEntry Catalog V2

     Create an entry within the catalog. We support a maximum of 50,000 entries per type.

    Args:
        body (CatalogV2CreateEntryRequestBody):  Example: {'aliases': ['lawrence@incident.io',
            'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123',
            'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference':
            'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id':
            '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

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

asyncio_detailed async

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

CreateEntry Catalog V2

Create an entry within the catalog. We support a maximum of 50,000 entries per type.

Parameters:

Name Type Description Default
body CatalogV2CreateEntryRequestBody

Example: {'aliases': ['lawrence@incident.io', 'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id': '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

Response[CatalogV2CreateEntryResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_entry.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateEntryRequestBody,
) -> Response[CatalogV2CreateEntryResponseBody]:
    """CreateEntry Catalog V2

     Create an entry within the catalog. We support a maximum of 50,000 entries per type.

    Args:
        body (CatalogV2CreateEntryRequestBody):  Example: {'aliases': ['lawrence@incident.io',
            'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123',
            'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference':
            'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id':
            '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

    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: CatalogV2CreateEntryRequestBody
) -> Optional[CatalogV2CreateEntryResponseBody]

CreateEntry Catalog V2

Create an entry within the catalog. We support a maximum of 50,000 entries per type.

Parameters:

Name Type Description Default
body CatalogV2CreateEntryRequestBody

Example: {'aliases': ['lawrence@incident.io', 'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id': '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

CatalogV2CreateEntryResponseBody

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_entry.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateEntryRequestBody,
) -> Optional[CatalogV2CreateEntryResponseBody]:
    """CreateEntry Catalog V2

     Create an entry within the catalog. We support a maximum of 50,000 entries per type.

    Args:
        body (CatalogV2CreateEntryRequestBody):  Example: {'aliases': ['lawrence@incident.io',
            'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123',
            'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference':
            'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id':
            '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

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

sync_detailed

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

CreateEntry Catalog V2

Create an entry within the catalog. We support a maximum of 50,000 entries per type.

Parameters:

Name Type Description Default
body CatalogV2CreateEntryRequestBody

Example: {'aliases': ['lawrence@incident.io', 'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123', 'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference': 'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id': '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

Response[CatalogV2CreateEntryResponseBody]

Source code in incident_io_client/api/catalog_v2/catalog_v2_create_entry.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: CatalogV2CreateEntryRequestBody,
) -> Response[CatalogV2CreateEntryResponseBody]:
    """CreateEntry Catalog V2

     Create an entry within the catalog. We support a maximum of 50,000 entries per type.

    Args:
        body (CatalogV2CreateEntryRequestBody):  Example: {'aliases': ['lawrence@incident.io',
            'lawrence'], 'attribute_values': {'abc123': {'array_value': [{'literal': 'SEV123',
            'reference': 'incident.severity'}], 'value': {'literal': 'SEV123', 'reference':
            'incident.severity'}}}, 'catalog_type_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'external_id':
            '761722cd-d1d7-477b-ac7e-90f9e079dc33', 'name': 'Primary On-call', 'rank': 3}.

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

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)