# Search nominal speeds (https://docs.pulsarml.com/v1/api-reference/nominal-speeds/post-nominal-speeds-filters)

Search the configured speeds for machine and SKU combinations.

Useful for auditing: a machine/SKU pair with no nominal speed, or an obviously wrong one,
is the most common cause of a performance figure nobody believes.

## `POST /v1/nominal-speeds/filters`

Base URLs:
- `https://draco.prod.pulsarml.com` — Production
- `https://draco.dev.pulsarml.com` — Development (sandbox)

Authentication: send your API key in the `x-api-key` header.

### Request body (`application/json`, required)

Type: object (`GetNominalSpeedsByFiltersRequestV1`)

- `page` (integer, optional, default `1`, > 0, e.g. `1`) — The page number for pagination
- `limit` (integer, optional, default `10`, > 0, e.g. `10`) — The number of items per page for pagination
- `machines` (object, optional, nullable) — Filter criteria for machines
  - `search` (string, optional, nullable) — Search term for Machines
  - `include` (array of integer, optional, nullable) — Items to include by id
  - `exclude` (array of integer, optional, nullable) — Items to exclude by id
- `skus` (object, optional, nullable) — Filter criteria for skus
  - `search` (string, optional, nullable) — Search term for Skus
  - `include` (array of string, optional, nullable) — Items to include by id
  - `exclude` (array of string, optional, nullable) — Items to exclude by id
- `nominalSpeed` (object, optional, nullable) — Filter criteria for nominal speeds
  - `greaterThan` (number, optional, nullable, e.g. `1`) — Greater than value
  - `greaterThanOrEqual` (number, optional, nullable, e.g. `1`) — Greater than or equal to value
  - `lessThan` (number, optional, nullable, e.g. `1`) — Less than value
  - `lessThanOrEqual` (number, optional, nullable, e.g. `1`) — Less than or equal to value
  - `equal` (number, optional, nullable, e.g. `1`) — Equal value
  - `notEqual` (number, optional, nullable, e.g. `1`) — Not equal value

### Responses

#### 200 — A page of nominal speeds, with the total count and page count

Type: object (`GetNominalSpeedsByFiltersResponseV1`)

- `totalCount` (integer, optional, default `100`) — The total count of items
- `totalPages` (integer, optional, default `10`) — The total number of pages
- `currentPage` (integer, optional, default `1`) — The current page
- `nominalSpeeds` (array of object, required)
  - `id` (string, required, e.g. `"36f7b519-d93e-4ec8-8245-7f4b8c123456"`) — The unique identifier for the nominal speed.
  - `machine` (object, required) — The machine associated with the nominal speed.
    - `id` (integer, required, e.g. `1`) — The unique identifier for the machine.
    - `name` (string, required, e.g. `"machine 1"`) — The name of the machine.
  - `sku` (object, required) — The sku associated with the nominal speed.
    - `id` (string, required, e.g. `"f1c3a9e9-1cef-4d1d-a6d7-e18607cbfa55"`) — The unique identifier for the sku.
    - `name` (string, required, e.g. `"sku 1"`) — The name of the sku.
    - `description` (string, required, e.g. `"sku 1 description"`) — The description of the sku.
    - `unit` (string, required, e.g. `"sku 1 unit"`) — The unit of the sku.
  - `nominalSpeed` (number, required, e.g. `100`) — The nominal speed of the machine.
  - `countingFactor` (number, required, e.g. `1`) — The counting factor of the sensor associated with the machine and sku.
  - `createdAt` (string (date-time), required, e.g. `"2024-01-01T00:00:00.000Z"`) — The timestamp when the nominal speed was created.
  - `updatedAt` (string (date-time), required, e.g. `"2024-01-01T00:00:00.000Z"`) — The timestamp when the nominal speed was last updated.
  - `deletedAt` (string (date-time), optional, nullable, e.g. `"2024-01-02T00:00:00.000Z"`) — The timestamp when the nominal speed was deleted, if applicable.

#### 422 — Validation Error

Type: object (`HTTPValidationError`)

- `detail` (array of object, optional)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)

### Example request

```bash
curl -X POST 'https://draco.prod.pulsarml.com/v1/nominal-speeds/filters' \
  -H 'x-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "page": 1,
    "limit": 10,
    "machines": {
      "exclude": [
        1
      ],
      "include": [
        1
      ],
      "search": "machine 1"
    },
    "skus": {
      "exclude": [
        "1145d032-975c-4cdb-a378-910aeb3f5865"
      ],
      "include": [
        "ffce6941-7dcf-4026-a396-0c4927f5bb49"
      ],
      "search": "sku 1"
    },
    "nominalSpeed": {
      "equal": 1,
      "greaterThan": 1,
      "greaterThanOrEqual": 1,
      "lessThan": 1,
      "lessThanOrEqual": 1,
      "notEqual": 1
    }
  }'
```