While searching for infos about Add a web cache in front of xwiki? I tried to experiment with the REST API ony my own.
I’ve read REST API (XWiki.org) (well, the parts that I can understand, since I administer out instance, but have no experience with its internals).
I’m running these from the browser console after being authenticated on our instance.
So far I came up with these requests:
-
/xwiki/rest/wikis/query?q=object:XWiki.XWikiUsers&media=json
- obtaining all the users (of all the subwikis)
-
/xwiki/rest/wikis/query?q=object:XWiki.XWikiRights&media=json
- getting I’m not sure what
-
/xwiki/rest/wikis/query?q=object:XWiki.XWikiGroups&media=json
- obtaining all the groups
I have no idea, though, how to:
- get the groups a user belongs
- get the username of the current session*
- get the groups that have the view right on a particular page
*: the objective here is to run requests from a web cache, that’s why this is important - and I’ve only found that requests hold a cookie but the username inside is encoded.
A search here on the forum brought up several threads, but none with informations I can follow.
At the same time I’m inspecting the several URLs that are comprised in each response links element.
Are there other guidelines beside those in the wiki.org REST API page I linked above?