Add restrictions on pages

I’m trying to add restrictions on pages with REST api. But unfortunately, I haven’t found a workable way to do it.
Here is the latest API document from confluence:
https://developer.atlassian.com/cloud/confluence/rest/#api-api-content-id-restriction-post
But it doesn’t work. I don’t even know which fields are mandatory or optionals in data part.

I also tried someone’s suggestion with PUT…, but it didn’t work either.

Can anyone help?

Atlanssian’s documents are really Sxxks. I had a terrible experience back to a few years ago with their JIRA document. Now it’s the same thing here with Confluence.

I guess they just did this on purpose so no one could really understand their product so that they could still sell their support and products.

Hey @JohnHuang. First can you clarify which deployment option of Confluence you’re using? You’re posting in the Confluence Server category but you’re linking to Confluence Cloud REST API’s. Server and Cloud are very different products so trying to use cloud REST API’s may not work for you.

Hi, Could you help to share how to set page permission (restriction) by Confluence server REST API?
My confluence version is 7.3.3
Thanks a lot.
@rwhitbeck

More information, my requirement actually is locking one linked Confluence page in JIRA issue workflow transition.
Thanks a lot for your help and suggestion firstly.
@rwhitbeck