iii_carlos

updated

6 years ago

0

1202

July 27th, 2020 17:00

API string function such as contains, endswith and startswith

OME API uses OData-Version 4.0.

Ref: http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_The_$filter_System

 

Using the built-in $filter function, does it implemented the usage of string functions such as contains, endswith and startswith?

I tried this URI in Postman:

https:// /api/DeviceService/Devices?$filter=startswith(DeviceName,'iDRAC')

but it returned a status of "501 Not Implemented".

In the Web GUI, we can filter the device name by just typing the first few characters. I was hoping that it can be done as well in an API call by only returning those records based on the filter and not by iterating each data returned.

  • 1089

    0

    Posted July 27th, 2020 17:00

    Sorry, I tried contains function and it worked but endswith and startswith did not. Thanks.