I work for an organization that underwent several Confluence migrations in the past. Because of this several similar user groups exist and it is time to consolidate them.
We have a script to identify in which spaces groups have space permissions.
But identifying if a group has been used in a page restriction seems difficult (or impossible?)
Is there a way to know on which pages a certain group is in the page restrictions?
We thought of looping over all pages but the user making the API call will not see pages it cannot access so this will never work.
Other ideas are welcome! Preferably without plugins. API endpoints are more than welcome.
This is for Confluence standard and premium since we have multiple sites.
You will need to use the API endpoint https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions/#api-wiki-rest-api-content-id-restriction-byoperation-operationkey-bygroupid-groupid-get
This api endpoint should be run on each page to see if the group used in the page restrictions
Hi Marc!
That's great, thanks for the pointer!
I totally missed this because I was only looking at the v2 API documentation.
I will loop over all pages in each space by using /spaces/{id}/pages and then I can use the endpoint you suggested.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
API V2 offers some fallback options, but use V3 first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes thanks.
It's a bit annoying that you need to check multiple pages for existing endpoints. But ok, I can live with it :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.