I'm trying to use the REST API to retrieve some data but the API seems to be
ignoring the type parameter.
My environment is XWiki 7.4.2, Debian 8, PostgreSQL, Tomcat 8, Openjdk 8
If I try to fetch some data using the browser and the following URL:
http:// ...
/rest/wikis/query?q=select%20obj.first_name,obj.last_name%20from%20Document%20doc,%20doc.object%28XWiki.XWikiUsers%29%20as%20obj&type=xwql
the result is as follows (I'm reproducing here only the first few lines -
there are actually 10 items returned)
<searchResults
template="http://10.1.16.192:8080/wiki/rest?q={solrquery}(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})"><searchResult><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces/XWiki/pages/DocumentTreeMacros"
rel="http://www.xwiki.org/rel/page"/><type>page</type…
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces/Panels/pages/DocumentInformation"
rel="http://www.xwiki.org/rel/page"/><type>page</type…
The result is not related in any way to the user data or their names. From
the template on the first line, it seems to think that the query is a SOLR
query not xwql. I've verified that the query is correct xwql syntax and
gives a valid result by trying it in a velocity script on an actual xwiki
page. The result is basically the same if I just query for the first name
instead of both the first name and last name.
How should I be executing xwql queries using the REST API?
Regards
Mark Sack
--
View this message in context:
http://xwiki.475771.n2.nabble.com/REST-API-ignores-type-parameter-tp7599586…
Sent from the XWiki- Users mailing list archive at
Nabble.com.