Forums

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

Get DRAFT pages via REST API

Pavel September 17, 2018

I'm trying to get all the pages in status 'draft' via REST API

I found an article "How to clean programmatically old drafts and purge trash with python"

rest/api/content?spaceKey={space}&status=draft

The proposed method returns draft pages only for the current user in space.

And I need a method that returns the result for all users.

 

1 answer

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

Hi Pavel, 

The API would have the same permissions applied as if you were viewing the pages/drafts through your Browser.  If you're not the Draft's Author, it should not return when you call for Draft pages.

 

If you have access to your SQL Server, you could run a direct SELECT to find the Drafts within your instance; something like the following query would return all Draft Pages.

select * from CONTENT where CONTENTTYPE = 'DRAFT';

You can then manipulate the Drafts as needed. 

Cheers,

Shawn

Pavel September 25, 2018

@Shawn C, thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events