REST API endpoint create page "wiki/api/v2/pages" does not allow setting any non-page content as parent.

XMLWordPrintable

    • 6
    • Severity 2 - Major
    • 26

      Issue Summary

      REST API endpoint Create page wiki/api/v2/pages does not allow setting Folder (or whiteboard, embed, or database) as Parent.

      Steps to Reproduce

      Make a request to endpoint Create page to create a page and set Folder as parent.

      curl --request POST \
        --url 'https://{your-domain}/wiki/api/v2/pages' \
        --user 'email@example.com:<api_token>' \
        --header 'Accept: application/json' \
        --header 'Content-Type: application/json' \
        --data '{
        "spaceId": "<string>",
        "status": "current",
        "title": "<string>",
        "parentId": "<Folder ID>",
        "body": {
          "representation": "storage",
          "value": "<string>"
        }
      }'

      Expected Results

      Page to be created by setting Folder as parent as we can do it from UI.

      Actual Results

      We get the below error.

      {
          "errors": [
              {
                  "status": 500,
                  "code": "INTERNAL_SERVER_ERROR",
                  "title": "Internal Server Error",
                  "detail": null
              }
          ]
      }
      

      Workaround

      As a workaround create the page, then use the Move a page to a new location relative to a target page endpoint to set the folder as parent.

            Assignee:
            Nick Bourlier
            Reporter:
            Ramchandra Kudtarkar
            Votes:
            51 Vote for this issue
            Watchers:
            36 Start watching this issue

              Created:
              Updated:
              Resolved: