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:

Operator Description Operation Example
eq equal to specified value path eq 'my/path'
lt less than specified value Restrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the future updated lt '2018-07-27T17:05:31.208Z'
gt greater than specified value Restrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the future updated gt '2018-07-27T17:05:31.208Z'
lte less than or equal to specified value Restrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the future updated lte '2018-07-27T17:05:31.208Z'
gte greater than or equal to specified value Restrict usage to comparing Date only. Using it for path or name is not preferable and will be blocked in the future updated gte '2018-07-27T17:05:31.208Z'
and combine two conditions name 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.


Last update: May 2, 2023

Except where otherwise noted, content on this site is licensed under the Development License Agreement.