like: Search Examples

The search operation like will search for entities where the search attribute value partially matches the search criteria.

The search operation like should only be used to search for string type values.

Example 1: Search for entities with partial value string

Search:

  • Use the search API: Device Search
  • Match the attribute _id with values that contain 877
  • Limit the number of results to 10 per page
  • Return the first page

Filter object will look like this:

{
  "filter": {
    "_id": {
      "like": "877"
    }
  },
  "limit": 10,
  "page": 0
}

Encoded API call:

https://api.dev.example.biot-med.com/device/v2/devices?searchRequest=%7B%0A%20%20%22filter%22%3A%20%7B%0A%20%20%20%20%22_id%22%3A%20%7B%0A%20%20%20%20%20%20%22like%22%3A%20%22877%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22limit%22%3A%2010%2C%0A%20%20%22page%22%3A%200%0A%7D