Add permissions to a restricted page using API as site admin

Tal Sabag July 20, 2024

 

 

Hey,

I'm looking to get page details and provide access to restricted pages for users using the API when using site admin credentials, this is including that in most cases the site admin does not have access to the restricted page, Is it possible to achieve this?

I can also work with the option to add permissions to the site admin using API, and then run the process again, granting access to the requester.

I know that in Confluence UI as a site admin, I can use the admin key to access the page through the UI, but I'm not sure if that's possible using the API.I

 

If that's not possible, is there a way to get the page owner using the page ID?

 

Adding a note of what i am trying to achive, when we have a restricted pages of inactive users, i want to run an autoamtion that gives access to another user from his team. all this using API and not manually.

2 answers

0 votes
Antoine _Klee Group_
Contributor
November 29, 2024

Same need here. And nope it does not seem possible to use the "admin key" within the API. There is no endpoint to request it for a specific content. But worse, even if we request it through the UI, we (the user making the call) is still not considered to have the "read" permission on restricted content so API's will throw 404 content not found error anyway.

 

0 votes
Vronik
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2024

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events