Filter Operators
Default filter and Custom filter operator and its descriptions
Default Operators
NO
KEY
TYPE
DESC
SYMBOLIC SQL
1
lt
string
less than
<
2
lte
string
less than or equal to
≤
3
gt
string
greater than
>
4
gte
string
greater than or equal to
≥
5
eq
string
equal to
=
6
not
string
!=
7
exists
string
exists
EXISTS
8
contain
string
contains
%str%
9
not_contain
string
not contains
NOT LIKE '%str%';
10
in
string
include
IN ("a","b","c")
11
not_in
string
not include
NOT IN ("a", "b", "c")
12
not_contain_in
string
no contain in
NOT IN ('%A%', '%B%', '%C%')
13
match
string
WHERE T.A='a' AND T.B='b'
Sample Input
{
"domain_id": "{domain_id}",
"query": {
"filter": [
{
"k": "data.disk.core",
"v": 4,
"o": "gte"
},
{
"k": "tags.spaceone:plugin_name",
"v": "aws-health",
"o": "eq"
},
{
"k": "data.softwares",
"v": { "version": "1.0.0", "name": "mysql" },
"o": "match"
}
]
}
}Custom Operators
NO
KEY
TYPE
DESC
SYMBOLIC SQL
1
datetime_lt
string
date time less than
<
2
datetime_lte
string
date time less than or equal to
≤
3
datetime_gt
string
date time greater than
>
4
datetime_gte
string
date time greater than or equal to
≥
5
timediff_lt
string
time difference less than
<
6
timediff_lte
string
time difference less than or equal to
≤
7
timediff_gt
string
time difference greater than
>
8
timediff_gte
string
time difference greater than or equal to
≥
datetime or timediff builder
With ISO8601
Please refer to ISO8601 for more
{ "name": "spaceone", "query": { "filter": [ { "k": "created_at", "v": "2020-05-06T10:49:44Z", "o": "timediff_gt" } ] } }With operators
{ "name": "spaceone", "query": { "filter": [ { "k": "created_at", "v": "now + 24", "o": "timediff_gt" } ] } }Item
CANDIDATE
DESC
time
now, now/d, now/w
time values
operator
+, -
operator for sum and subtraction
deltas
24 (s, m, h, d, w)
value to operate with s: second
m: minute
h: hour
d: day
w: week
Last updated
Was this helpful?