Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titlemutli filter qparams

Note the second form of the last example. If multiple filter query parameters are specified, they are logically composed with the AND operator.

This can be very useful in conjunction with path based security permission.

For instance the following permission can be used with the simple file based Access Manager to restrict users to GET a collection only specifying a filter on the author property to be equal to their username:

 


regex[pattern="/test/coll/\?.*filter={'author':'(.*?)'}.*", value="%R", full-match=true] and equals[%u, "${1}"]

...

Code Block
themeMidnight
GET /test/coll?keys={'title':1}&keys={'summary':1}

It's possible to use the "dot notation" to specify fields within an object, for example, let's say that both title and summary are part of an header object:

Code Block
GET /test/coll?keys={'header.title':1}&keys={'header.summary':1}