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

Storage format with special characters in Create page API throws error 400

    XMLWordPrintable

Details

    Description

      Issue Summary

      Storage format with special characters in Create page API throws an error

      {
      "errors":[{"status":400,"code":"INVALID_MESSAGE","title":"Invalid message","detail":null}]
      }
      

      The storage format taken from the page UI can't be used to create a page via api.

      Steps to Reproduce

      • Create a new Confluence page
      • Create a (new) Jira issue macro 
      • Get the storage format from the page UI: click on  "..." >> Advanced details >> Storage format
      • With the storage format create a new page via Create page v2 API

      Expected Results

       
      The new page is created correctly via the API

      Actual Results

      The following error is thrown in Postman Web:

      {"errors": [{"status": 400,  "code": "INVALID_MESSAGE", "title": "Invalid message","detail": null}]}
      
      

      Workaround

      The above API has to be modified by replacing " with "\ and  \& with \&&  and then the API will work

      OR

      Get the storage format with the api: https://<INSTANCE_NAME>.atlassian.net/wiki/api/v2/pages/<page_id>?body-format=storage

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              56d8610cd0f7 Carmine Comparone
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: