Developer Reference

Query Filters

Overview

Query/filter syntax is very much similar to SQL’s WHERE clause. Each conditional is a combination of [attribute_name][conditional][value].

Following conditionals syntax are supported:


<, >, <, >=, =, <>, and, or, in

For using in conditional, the following value must be in side round brackets, each value is separated by comma(,) and quoted with (’) if the field is String or Date. For example:


point in (100,200,300) and status in ('ok', 'not found')

String/Unique String

In string comparison condition, single quote ’ is needed around the value.
E.g.


'first_name' = 'John'

Boolean

In boolean comparison conditionals, the values can be represented as follow;


TRUE  can be represented as 't' or 'true' or '1' or 1
FALSE can be represented as 'f' or 'false' or '0' or 0
E.g single = 1 OR single = 'true'

Date

Date values are treated like Strings and it must be in a strict format of yyyy-mm-ddTHH:MM:SS. For example;


date_of_birth > '1980-01-01T00:00:00'

Combined conditional queries

Query is allowed to contains AND and OR syntaxes. It is recommended to use braces accordingly.


(age > 20 AND point < 1000 ) OR date_of_birth > '1980-01-01T00:00:00'

You can use these query parameters when you’re calling list methods from your client side.