Requirement: Urgently: By which permission (API key) we can use API to fetch all pages count (including-Restricted & deleted) per space.
Currently Using: I am using '/wiki/rest/api/content?' API to fetch page counts with my API key(credentials) but it is not giving page counts which are restricted & deleted on the cloud. However, if I am running '/rest/api/content?' on the on-prem system it is giving page count including restricted & deleted pages
Why: We are migrating our confluence instance to the cloud so want to compare page count per space after migration to make sure nothing was missed because as we did the same on test instance and we observed few pages missed in migration but migrated successfully when we re-run again.
Thanks @Dam
Is there any way to give access on restricted pages for all spaces in one go so that API can return count including restricted & deleted pages?
As I know we can give access to restricted page by page itself. Open restricted page and add user/group for view/edit. But it is not possible to do manually for every page.
I am asking because as I want to give access to my self. As on my instance, we have 250 spaces and have many restricted pages on each space.
Hi @Ankit Rastogi ,
I'm afraid you can't in Confluence Cloud API, the doc is clear: https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-get
"Only content that the user has permission to view will be returned."
But with the expand options you can view where restrictions are and who can edit or view:
restrictions.read.restrictions.user
returns the users that have permission to read the content.restrictions.read.restrictions.group
returns the groups that have permission to read the content. Note that this may return deleted groups, because deleting a group doesn't remove associated restrictions.restrictions.update.restrictions.user
returns the users that have permission to update the content.restrictions.update.restrictions.group
returns the groups that have permission to update the content. Note that this may return deleted groups because deleting a group doesn't remove associated restrictions.I hope it helps a bit.
Cheers,
Dam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Dam
Is there any way to give access on restricted pages for all spaces in one go so that API can return count including restricted & deleted pages?
As I know we can give access to restricted page by page itself. Open restricted page and add user/group for view/edit. But it is not possible to do manually for every page.
I am asking because as I want to give access to my self. As on my instance, we have 250 spaces and have many restricted pages on each space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another Question.
How we can use site admin key for API? I mean how can I fetch API key for my site admin access because I am using site admin access on UI to see restricted pages?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any way to give access on restricted pages for all spaces in one go so that API can return count including restricted & deleted pages?
Well by script calls to the API it doable but there is no others ways around as far as I know...
How we can use site admin key for API? I mean how can I fetch API key for my site admin access because I am using site admin access on UI to see restricted pages?
Well just create an API key with the site admin user account... if you see restricted pages or deleted content with it, it should be the same using API cause permissions match in all cases: from the UI or from the APIs normally.
Just create an API token with the proper user account:
https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
I hope this helps again ;)
Cheers,
Dam.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.