How to get the Necessary information from confluence server webhook payload

Kshitij Katiyar April 19, 2022

I am trying to connect my app to Confluence server through their webhook api.After Connection the payload looks something like this 

{
  "timestamp": 1650356000431,
  "event": "page_created",
  "userKey": "xxxxxxxxxxxxxxxxxxxxx",
  "page": {
    "id": xxxxxx
  }
}

Now this event is for page creation .similarly i am listening for comment events,page events and space events .Now how can i get other informations like page title , space name etc from these ids and how can i also check whether the given user have the necessary authority to see this payload   

1 answer

0 votes
Thiago Masutti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2022

Hi @Kshitij Katiyar 
I hope you are doing well.

You can get more details about page and users by using the Confluence REST API.

I don't think there's a public (supported) API to check if a user can read a specific content.

For that purpose you may use Gatekeeper's internal APIs, such as the below:

GET
<Confluence_Base_URL>/plugins/gatekeeper-plugin/who-can-view/evaluate.action?spaceKey=<spacekey>&pageId=<pageid>&hideAnonymous=false&ignoreRestrictions=false&start=0&count=10&filter=<username>

 

 

I hope that helps.

Kind regards,
Thiago Masutti

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events