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
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events