---
title: "Search for a list of device(s) Copy"
url: "https://developer.mla.com.au/apis/device-public-production/versions/1cf272f5-2ff6-4b07-8a8c-ecb73eab03b2/operations/searchDeviceOpt"
---

> Full API specification: https://developer.mla.com.au/apis/device-public-production/versions/1cf272f5-2ff6-4b07-8a8c-ecb73eab03b2.md

# Search for a list of device(s) Copy

`OPTIONS` `/public/device/v1/search`

Operation ID: `searchDeviceOpt`

INTERNAL USE.

## Header parameters

- `correlationId` (string, required) - UUID used to track the API call from the invoker's perspective. Sender is required to include the correlationId in the request to use it as a tracker for asynchronous responses.
- `outputFields` (string, required) - A comma-separated list of the Device data fields to return from the search. If blank, it will return all Device data.
- `sortBy` (string, optional) - The field to sort the output list by.
- `sortOrder` (string, optional) - The order to return the list based on sortBy i.e. ascend means alphabetical/numerical.

## Responses

- `200`
- `404`
- `422`

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Device Public
  version: v1.0.0
servers:
  - url: https://7d40e2d8b1.gateways.konggateway.com
paths:
  /public/device/v1/search:
    options:
      summary: Search for a list of device(s) Copy
      deprecated: false
      description: INTERNAL USE.
      operationId: searchDeviceOpt
      tags:
        - Device
      parameters:
        - name: correlationId
          in: header
          description: UUID used to track the API call from the invoker's perspective.
            Sender is required to include the correlationId in the request to
            use it as a tracker for asynchronous responses.
          required: true
          example: ""
          schema:
            type: string
        - name: outputFields
          in: header
          description: A comma-separated list of the Device data fields to return from the
            search. If blank, it will return all Device data.
          required: true
          example: devices.EID.rfid
          schema:
            type: string
        - name: sortBy
          in: header
          description: The field to sort the output list by.
          required: false
          example: ""
          schema:
            type: string
        - name: sortOrder
          in: header
          description: The order to return the list based on sortBy i.e. ascend means
            alphabetical/numerical.
          required: false
          example: ""
          schema:
            type: string
            enum:
              - asc
              - desc
      responses:
        "200":
          description: ""
          headers:
            correlationId:
              example: ""
              required: true
              description: UUID used to track the API call from the invoker's perspective.
                Sender is required to include the correlationId in the request
                to use it as a tracker for asynchronous responses.
              schema:
                type: string
        "404":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
        "422":
          description: ""
          content:
            application/json:
              schema:
                title: ""
                type: object
                properties:
                  error:
                    type: string
                  details:
                    items:
                      $ref: "#/components/schemas/ValidationError"
                    type: array
                    title: Detail
                required:
                  - error
                  - details
          headers: {}
      security: []
security: []
components:
  schemas:
    ValidationError:
      properties:
        field:
          type: string
          title: Message
        message:
          type: string
          title: Error Type
      type: object
      required:
        - field
        - message
      title: ValidationError
```
