Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
...
queryNodes
provides a filtering mechanism. Filters are added as request parameters. Filter values must be properly URL encoded. You can use multiple filters within the same request.
The filter parameter has the following format: property[operator]=value
...
Code Block |
---|
https://example.com/.rest/delivery/pages/v1?title[like]=tour |
eq
means =
ne
means <>
lt
means <
gt
means >
lte
means <=
gte
means >=
like
means LIKE
in
means IN
not-in
means NOT IN
If no operator is provided, eq
is used by default.
The value
in the filter parameter is treated as String
.
Use brackets to pass an operator, for example [eq]
, [ne]
, [lt]
, and so on.
For in
and not-in
, a range symbol ~
(the tilde) should be provided, for example:
Code Block |
---|
https://example.com/.rest/delivery/pages/v1?mgnl:created[in]=2018-01-01~2018-02-01 |
Date: yyyy-MM-dd
Code Block |
---|
2018-01-01 |
Datetime: yyyy-MM-dd'T'HH:mm:ss.SSSXXX
Code Block |
---|
2018-01-11T10:26:47.438+07:00 |
If a filter can have multiples possible values which must match, use |
(OR):
Mgnl mini code snippet | ||
---|---|---|
| ||
@ancestor=/travel/about/careers/marketing-associate |
Filter for a property of the node. Thev value for the property must be an exact match.
Mgnl mini code snippet | ||
---|---|---|
| ||
author=Magnolia%20Travels |
Filter for the node name.
Mgnl mini code snippet | ||
---|---|---|
| ||
@name=travel |
Filter for ancestor nodes of a provided path. The path must be absolute on the given workspace of the given workspace prefix.
Mgnl mini code snippet | ||
---|---|---|
| ||
@ancestor=/travel/about/careers/marketing-associate |
|
to provide multiple filter valuesOne filter can have multiples possible values which must match.
Mgnl mini code snippet | ||
---|---|---|
| ||
@name=travel|about |
Anchor | ||||
---|---|---|---|---|
|
Search nodes in the tours
workspace which contain the keyword vietnam . Return the results in descending order by the location
property and restrict the limit to one.
...