Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Content properties on trash event

David Torres September 26, 2018

Hi!

I am using an event listener for listening when a page is deleted, the event class is:

com.atlassian.confluence.event.events.content.page.PageTrashedEvent

 It works fine, nevertheless, content properties of the page seem to be already gone when the method is fired, is there an alternative to this issue? thanks in advance for your help.

1 answer

0 votes
Shawn C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 28, 2018

Hi David, 

If your listener can provide you with the Page/Content ID, you should be able to run an API Call to check the Trash and reference the ID to what's in it:

INSTANCE/rest/api/content?status=trashed&expand=body.storage

This will list out all 'trashed' pages that you have Space Admin permissions in.  If you happen to know the particular Space the trashed page belonged in, include a:

&spaceKey=KEY

to filter it down. 

Cheers,
Shawn

David Torres November 23, 2018

Hi Shwan I do not have issues obtaining the content but properties:  

https://developer.atlassian.com/server/confluence/content-properties-in-the-rest-api/

they are gone when the listener fires. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events