jpqlxwiki

Xwiki XWQL query in REST call does not work


I want to collect all Xwiki pages that where creted after a date with a REST call.

This is the documentation what I'm using. This is how the RESt call is made:

/wikis/{wikiName}/query?q={query}&type={hql,xwql,lucene,solr}[&distinct={true,false}]~[&order={asc,desc}][&start=n][&number=n][&prettyNames={true,false}][&className=className]

My problem is whit the query itself. If i leave it out everything works fine.

This is my rest call(XwikiServerPath represents a valid server path): XwikiServerPath/search?q=where%20doc.creationDate%20%3E%20%272018-04-29%27&type=xwql

if i write q=*, it retrieves all the pages. %20 is for space, and %3E is for the < sign and %27is for '

What is wrong with the query?


Solution

  • /query and /search are two very different things and, as you said, you are supposed to use /query for your need.