Skip to content

IoT File Service – Filtering

Search Filter Operators

The allowed operators in a filter clause are:

  • eq or =
  • gte or >=
  • gt or >
  • lte or <=
  • lt or <

Filters can be combined using the and operator. Blanks in the wrong place and invalid parameters will lead to the filter being ignored. Filtering is possible on the following fields:

  • File update timestamp
  • File path
  • File name

Note

Avoid using wild card character (*) in the search filter. This will have performance impact on the search queries. This will be restricted in the future.

By default, GET requests for a list of files return only the first up to 500 files. Use the offset parameter in the query string of the GET request to adjust at which file to start the list. Use the limit parameter to adjust how many files to return. Be aware that the offset parameter is limited to 10,000. It is recommended to refine the search to limit the response to small result sets.

Search Filter Syntax

The following table lists examples for the search filter syntax for each operator:

OperatorDescriptionOperationExample
eqequal to specified valuepath eq 'my/path'
ltless than specified valueRestrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the futureupdated lt '2018-07-27T17:05:31.208Z'
gtgreater than specified valueRestrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the futureupdated gt '2018-07-27T17:05:31.208Z'
lteless than or equal to specified valueRestrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the futureupdated lte '2018-07-27T17:05:31.208Z'
gtegreater than or equal to specified valueRestrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the futureupdated gte '2018-07-27T17:05:31.208Z'
andcombine two conditionsname eq 'result*.txt' and updated lte '2018-07-23T13:16:07.078Z'

Sorting Files

Default sorting in File Service would be applicable on 'updated date'. No further sorting will be applicable for the APIs.

Note

Current support for sort by name (order=name asc/desc) and by path (order=path) will be blocked in the future in File Service APIs.

Community

Connect and Collaborate with Industrial Professionals and Join the Community!

Click to load comments