Skip to content

katana_public_api_client.api.serial_number.get_all_serial_numbers

katana_public_api_client.api.serial_number.get_all_serial_numbers

Classes

Functions

asyncio(*, client, resource_type=UNSET, resource_id=UNSET, limit=UNSET, page=UNSET) async

List serial numbers

Returns a list of serial numbers, optionally filtered by resource_type and/or resource_id.

Filter behavior (verified live 2026-05-19):

  • Both filters set → results scoped to that exact (type, id).
  • resource_type alone → ALL serial numbers of that type across all resources (paginated, never 422).
  • resource_id alone → narrows to that resource regardless of type.
  • Neither filter → all serial numbers in the tenant (paginated).
  • Page beyond data → 200 with an empty data array, not 404.

Parameters:

  • resource_type (GetAllSerialNumbersResourceType | Unset, default: UNSET ) –
  • resource_id (int | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

Raises:

  • 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:

Source code in katana_public_api_client/api/serial_number/get_all_serial_numbers.py
async def asyncio(
    *,
    client: AuthenticatedClient | Client,
    resource_type: GetAllSerialNumbersResourceType | Unset = UNSET,
    resource_id: int | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> ErrorResponse | SerialNumberListResponse | None:
    """List serial numbers

     Returns a list of serial numbers, optionally filtered by
    ``resource_type`` and/or ``resource_id``.

    **Filter behavior** (verified live 2026-05-19):

    - Both filters set → results scoped to that exact ``(type, id)``.
    - ``resource_type`` alone → ALL serial numbers of that type
      across all resources (paginated, never 422).
    - ``resource_id`` alone → narrows to that resource regardless of
      type.
    - Neither filter → all serial numbers in the tenant (paginated).
    - Page beyond data → 200 with an empty ``data`` array, not 404.

    Args:
        resource_type (GetAllSerialNumbersResourceType | Unset):
        resource_id (int | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 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:
        ErrorResponse | SerialNumberListResponse
    """

    return (
        await asyncio_detailed(
            client=client,
            resource_type=resource_type,
            resource_id=resource_id,
            limit=limit,
            page=page,
        )
    ).parsed

asyncio_detailed(*, client, resource_type=UNSET, resource_id=UNSET, limit=UNSET, page=UNSET) async

List serial numbers

Returns a list of serial numbers, optionally filtered by resource_type and/or resource_id.

Filter behavior (verified live 2026-05-19):

  • Both filters set → results scoped to that exact (type, id).
  • resource_type alone → ALL serial numbers of that type across all resources (paginated, never 422).
  • resource_id alone → narrows to that resource regardless of type.
  • Neither filter → all serial numbers in the tenant (paginated).
  • Page beyond data → 200 with an empty data array, not 404.

Parameters:

  • resource_type (GetAllSerialNumbersResourceType | Unset, default: UNSET ) –
  • resource_id (int | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

Raises:

  • 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:

Source code in katana_public_api_client/api/serial_number/get_all_serial_numbers.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient | Client,
    resource_type: GetAllSerialNumbersResourceType | Unset = UNSET,
    resource_id: int | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> Response[ErrorResponse | SerialNumberListResponse]:
    """List serial numbers

     Returns a list of serial numbers, optionally filtered by
    ``resource_type`` and/or ``resource_id``.

    **Filter behavior** (verified live 2026-05-19):

    - Both filters set → results scoped to that exact ``(type, id)``.
    - ``resource_type`` alone → ALL serial numbers of that type
      across all resources (paginated, never 422).
    - ``resource_id`` alone → narrows to that resource regardless of
      type.
    - Neither filter → all serial numbers in the tenant (paginated).
    - Page beyond data → 200 with an empty ``data`` array, not 404.

    Args:
        resource_type (GetAllSerialNumbersResourceType | Unset):
        resource_id (int | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 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[ErrorResponse | SerialNumberListResponse]
    """

    kwargs = _get_kwargs(
        resource_type=resource_type,
        resource_id=resource_id,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, resource_type=UNSET, resource_id=UNSET, limit=UNSET, page=UNSET)

List serial numbers

Returns a list of serial numbers, optionally filtered by resource_type and/or resource_id.

Filter behavior (verified live 2026-05-19):

  • Both filters set → results scoped to that exact (type, id).
  • resource_type alone → ALL serial numbers of that type across all resources (paginated, never 422).
  • resource_id alone → narrows to that resource regardless of type.
  • Neither filter → all serial numbers in the tenant (paginated).
  • Page beyond data → 200 with an empty data array, not 404.

Parameters:

  • resource_type (GetAllSerialNumbersResourceType | Unset, default: UNSET ) –
  • resource_id (int | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

Raises:

  • 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:

Source code in katana_public_api_client/api/serial_number/get_all_serial_numbers.py
def sync(
    *,
    client: AuthenticatedClient | Client,
    resource_type: GetAllSerialNumbersResourceType | Unset = UNSET,
    resource_id: int | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> ErrorResponse | SerialNumberListResponse | None:
    """List serial numbers

     Returns a list of serial numbers, optionally filtered by
    ``resource_type`` and/or ``resource_id``.

    **Filter behavior** (verified live 2026-05-19):

    - Both filters set → results scoped to that exact ``(type, id)``.
    - ``resource_type`` alone → ALL serial numbers of that type
      across all resources (paginated, never 422).
    - ``resource_id`` alone → narrows to that resource regardless of
      type.
    - Neither filter → all serial numbers in the tenant (paginated).
    - Page beyond data → 200 with an empty ``data`` array, not 404.

    Args:
        resource_type (GetAllSerialNumbersResourceType | Unset):
        resource_id (int | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 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:
        ErrorResponse | SerialNumberListResponse
    """

    return sync_detailed(
        client=client,
        resource_type=resource_type,
        resource_id=resource_id,
        limit=limit,
        page=page,
    ).parsed

sync_detailed(*, client, resource_type=UNSET, resource_id=UNSET, limit=UNSET, page=UNSET)

List serial numbers

Returns a list of serial numbers, optionally filtered by resource_type and/or resource_id.

Filter behavior (verified live 2026-05-19):

  • Both filters set → results scoped to that exact (type, id).
  • resource_type alone → ALL serial numbers of that type across all resources (paginated, never 422).
  • resource_id alone → narrows to that resource regardless of type.
  • Neither filter → all serial numbers in the tenant (paginated).
  • Page beyond data → 200 with an empty data array, not 404.

Parameters:

  • resource_type (GetAllSerialNumbersResourceType | Unset, default: UNSET ) –
  • resource_id (int | Unset, default: UNSET ) –
  • limit (int | Unset, default: UNSET ) –

    Default: 50.

  • page (int | Unset, default: UNSET ) –

    Default: 1.

Raises:

  • 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:

Source code in katana_public_api_client/api/serial_number/get_all_serial_numbers.py
def sync_detailed(
    *,
    client: AuthenticatedClient | Client,
    resource_type: GetAllSerialNumbersResourceType | Unset = UNSET,
    resource_id: int | Unset = UNSET,
    limit: int | Unset = UNSET,
    page: int | Unset = UNSET,
) -> Response[ErrorResponse | SerialNumberListResponse]:
    """List serial numbers

     Returns a list of serial numbers, optionally filtered by
    ``resource_type`` and/or ``resource_id``.

    **Filter behavior** (verified live 2026-05-19):

    - Both filters set → results scoped to that exact ``(type, id)``.
    - ``resource_type`` alone → ALL serial numbers of that type
      across all resources (paginated, never 422).
    - ``resource_id`` alone → narrows to that resource regardless of
      type.
    - Neither filter → all serial numbers in the tenant (paginated).
    - Page beyond data → 200 with an empty ``data`` array, not 404.

    Args:
        resource_type (GetAllSerialNumbersResourceType | Unset):
        resource_id (int | Unset):
        limit (int | Unset):  Default: 50.
        page (int | Unset):  Default: 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[ErrorResponse | SerialNumberListResponse]
    """

    kwargs = _get_kwargs(
        resource_type=resource_type,
        resource_id=resource_id,
        limit=limit,
        page=page,
    )

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

    return _build_response(client=client, response=response)