Forums

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

Delete draft change using REST

Toralf Lund
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 16, 2022

Hi.

Does anyone know how to delete a draft for a new Confluence page version, i.e. an "unpublished change", using REST? Is it even possible? The obvious way does not work for me, as shown by the following curl command and output (some information hidden/changed for security reasons):

$ curl --request DELETE --url 'https://ourdomain.atlassian.net/wiki/rest/api/content/428965932?status=draft' --user 'toralf:<token>'
{"statusCode":400,"data":{"authorized":true,"valid":false,"errors":[{"message":{"key":"content.delete.published","args":[]}}],"successful":false},"message":"com.atlassian.confluence.api.service.exceptions.BadRequestException: null"}

 A GET with the same URL returns the expected JSON data for my content.

Note that the page in question has already been published; I'm not talking about a draft for a new page, but rather a (potential) new version marked as "draft".

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events