Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-70605

Delete content REST API status codes return 204 for trashed (200 expected per docs)

    XMLWordPrintable

Details

    Description

      Issue Summary

      In the documentation for 'Delete content' https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-api-content-id-delete

      DELETE /wiki/rest/api/content/{id}

      it states that status 200 is returned if the content is successfully trashed.

       

      However, when you run the endpoint you get back 204 status code whether you specify a status query parameter or not. 

      Steps to Reproduce

      1. Create a page in Confluence
      2. Open Postman and run the delete content endpoint adding the id of the page you just created.
      3. Per the documentation, a status code of 200 is expected.  204 is returned.
      4. Check the Trashed pages in Confluence and see that your page is sitting in trashed
      5. Run the delete content endpoint again in postman this time add the `status=trashed` query parameter.  204 is returned as expected which is listed in the documentation as successfully purged.

      Expected Results

      When running the delete content endpoint without the status query parameter I should expect back a http status code of 200 per documentation.

      Actual Results

      A status code of 204 is returned.

      Workaround

      None

      Origins of the issue

      This was originally raised on the Developer Community https://community.developer.atlassian.com/t/custom-content-trashed-status/40227 the poster is looking for how to determine if a piece of content was trashed or purged based on the status code.

      Attachments

        Activity

          People

            1caaf5845972 Denys Prokhorin (Inactive)
            rwhitbeck Ralph Whitbeck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: