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.
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
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 nowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.