Diffusion Apple API
6.2.8
Unified Client Library for iOS, tvOS and OS X / macOS
|
Session filters are a mechanism for accessing sessions by means of a query expression. For example, it is possible to send a message to all sessions that satisfy a specified filter. Filters are parsed and evaluated at the server.
A session filter query consists of either:
Department is "Accounts"
Department is "Payroll" and Status is "Closed"
Search clauses may be linked by the boolean operators and
or or
, where and
takes precedence over or
. Parentheses may be used to override the precedence as follows:
(Department is "Accounts" or Department is "Payroll") and Status is "Closed"
The boolean not
operator may be used to negate the following clause:
not Department is "Payroll"
or an expression within parentheses:
not (Department is "Payroll" or Department is "Accounts")
A search clause takes the form key operator value, where:
Only string values are currently supported and must be enclosed within either single or double quotes. Special characters ("
, '
or \
) may be included within the value by preceding with the escape character \
). The convenience method PTDiffusionEscape
can be used to insert escape characters into a value.
Supported operators are as follows:
is
or eq
: equals.ne
: not equals.All operators are case insensitive.
The following are examples of valid expressions:
$Principal is "Alice"
Department is "Accounts" and $Country ne "US"
$Language EQ "en" and $Country NE "US"
not (Department is "Accounts" or Department is "Payroll") and $Country is "FR"
Text is "xyz\\"\\"