# REST API to configure users & rights

**URL:** <https://forum.xwiki.org/t/rest-api-to-configure-users-rights/8986>\
**Category:** Development\
**Tags:** rest, xwiki\
**Created:** [July 9, 2021, 9:42am UTC](https://forum.xwiki.org/t/rest-api-to-configure-users-rights/8986 "2021-07-09T09:42:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lhall](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/l/cdc98d/32.png) [@lhall](https://forum.xwiki.org/u/lhall)\
**Post date:** [July 9, 2021, 9:42am UTC](https://forum.xwiki.org/t/rest-api-to-configure-users-rights/8986/1 "2021-07-09T09:42:33Z")

</div>

Hi,

I am able to successfully create subwikis through the REST API provided by the `/wikimanager` resource.

Is there any way to configure the users and rights for subwikis through the REST API? Eg: The web UI allows you to “Prevent unregistered users from viewing pages, regardless of the page rights” - can this be set via REST?

The `/wikimanager` resource doesn’t seem to support that, and I don’t see anything here that might help: [https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI](https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI) . Am I missing something? Is there an extension that might help?

thanks,  
Leigh

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [July 23, 2021, 3:06pm UTC](https://forum.xwiki.org/t/rest-api-to-configure-users-rights/8986/2 "2021-07-23T15:06:04Z")

</div>

> [@lhall](#):
>
> Is there any way to configure the users and rights for subwikis through the REST API? Eg: The web UI allows you to “Prevent unregistered users from viewing pages, regardless of the page rights” - can this be set via REST?

yes. Rights are xobjects. See [https://snippets.xwiki.org/xwiki/bin/view/Extension/Setting%20Rights](https://snippets.xwiki.org/xwiki/bin/view/Extension/Setting%20Rights)

And “Prevent unregistered users from viewing pages, regardless of the page rights” is an xproperty of the `XWiki.XWikiPreferences` xclass AFAIK (`authenticate_view`).

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [July 23, 2021, 3:06pm UTC](https://forum.xwiki.org/t/rest-api-to-configure-users-rights/8986/3 "2021-07-23T15:06:52Z")

</div>

Using [https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI#HObjectresources](https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI#HObjectresources) to set xproperties of xobjects (`/wikis/{wikiName}/spaces/{spaceName}[/spaces/{nestedSpaceName}]*/pages/{pageName}/objects/{className}/{objectNumber}/properties/{propertyName}[?minorRevision={true,false}]` to be precise)
