With Confluence Server REST API/webhook how to get view restrictions efficiently

Walter Mauritz July 9, 2024

I want to get view restrictions ... in bulk preferably or by webhook

 

First I have thought 

 

/rest/api/content/search?cql=space=MYSPACENAME AND type=page AND lastModified >= 2024-06-01

I will get restrictions here. A "restrictions" JSON element exists, but is empty, although I have view restrictions.

 

with:

/rest/api/content/1257046040/restriction/byOperation

I get view restrictions, but I would need to call every page

 

Can I get view restriction changes by webhook?

Is there some method to get "bulk" all/delta (changed since X) view restrictions for all pages in a space?

 

... its hosted on prem ... but selecting this hosting type gives an POST error

1 answer

0 votes
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 9, 2024

I fixed the tags for you.

 

Docs for the Data Center API for page restrictions:

https://developer.atlassian.com/server/confluence/rest/v900/api-group-content-restrictions/#api-group-content-restrictions

However, if you don't want to search by Operation, the restrictions are also listed under Page Properties, you need to pull it out of the JSON.

https://developer.atlassian.com/server/confluence/rest/v900/api-group-content-property/#api-rest-api-content-id-property-get

Walter Mauritz July 11, 2024

thx for help with tags.

 

I have checked your links. Both get restrictions by page id. I want to get page restrictions for multiple pages in one request. 

And my other question was how to get notified when page restrictions change

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events