Guidelines at querying users/group in XWiki from the REST API

Hi there,
I’ve been crawling at the REST API documentation in still I’m unsure what could be the best way to:

  • check if a given user exists (and probably get basic metadata about it). For this I suppose I have to look for the page that hold the user info. Something like query https://xwiki.instance/rest/wikis/xwiki/spaces/XWiki/pages/<username> should do the trick or is there a better way ?
  • remove an user from XWiki. Here I assume I should delete the above page but what about the group membership ? I should remove the user from the group(s) he is member of as well. How would you do that efficiently ?


Yes there is currently no user/group oriented REST API so that would be the way.

Actually this is done automatically in a listener in XWiki (which also means that deleting a user document might take a little while in some conditions).

1 Like