Hello,
I can create a new folder in the Confluence sidebar via API: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-post
But if I use the folder id as parentId for pages (https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-post), an internal error without any details will be thrown.
Does anyone know how to get this running or is the Page API not ready for work with folders?
Best
Thorsten
2 Likes
This looks like a bug. The respective endpoints for whiteboards, databases, and smart links are working with parent folders. It would probably be best if you create a ticket here: Jira Service Management.
1 Like
It’s not a bug per se, just a limit of the API that won’t allow pages to be created below other content types (such as databases, folders or whiteboards). Those content types are quite new and the API endpoints have yet to ‘catch up’.
The workaround is to create the page, then use the v1 Move a page to a new location endpoint and append that page to the other content type (database, folder, whiteboard etc) that you want as the parent.
Even though that endpoint refers to pages, it works on all content types, so you can use it to move any content (and its descendents) to any specific location anywhere in the content tree.
1 Like