You're right - I was missing the wiki name. But, for some reason, I still
can't get the queries to work. Here is what I've found so far.
There is only one wiki - confirmed by the following REST call:
http://10.1.16.192/wiki/rest/wikis/ which returns
<wikis><link href="http://10.1.16.192:8080/wiki/rest/wikis/query"
rel="http://www.xwiki.org/rel/query"/><wiki><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces"
rel="http://www.xwiki.org/rel/spaces"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/classes"
rel="http://www.xwiki.org/rel/classes"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/modifications"
rel="http://www.xwiki.org/rel/modifications"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/search"
rel="http://www.xwiki.org/rel/search"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/query"
rel="http://www.xwiki.org/rel/query"/><id>xwiki</id&g…
I can get some information about the wiki using
http://10.1.16.192/wiki/rest/wikis/xwiki/ which returns
<wiki><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces"
rel="http://www.xwiki.org/rel/spaces"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/classes"
rel="http://www.xwiki.org/rel/classes"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/modifications"
rel="http://www.xwiki.org/rel/modifications"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/search"
rel="http://www.xwiki.org/rel/search"/><link
href="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/query"
rel="http://www.xwiki.org/rel/query"/><id>xwiki</id&g…
I can get a list of spaces in the wiki using
http://10.1.16.192/wiki/rest/wikis/xwiki/spaces/
I won't reproduce the results as it is quite long but it looks correct and
includes those that I've added.
But if I try to do a simple query such as
.../rest/wikis/xwiki/query?q=select+obj.first_name+from+Document+doc%2C+doc.object%28XWiki.XWikiUsers%29+as+obj&type=xwql
the result is
<searchResults
template="http://10.1.16.192:8080/wiki/rest/wikis/xwiki/query?q={query}(&type={type})(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})"/>
whereas the same query executed in velocity (without the URL encoding)
returns the correct result.
This is again probably some simple item I've overlooked. I appreciate your
help in resolving this problem.
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.