如何使用REST API在Confluence中创建新页面作为特定父级的第一个子级?

时间:2017-12-06 14:20:02

标签: rest api confluence confluence-rest-api

使用REST API(How to create new page in Confluence using their REST API?)自动创建新页面非常简单。

但是,这会将新生成的网站添加到页面层次结构/页面导航的底部,如下所示:

+ Reports
    + Report for January
    + Report for February
    + Report for MARCH
    + NEWLY ADDED REPORT for APRIL

尽管如此,最好还是以相反的方式报告报告(最新报告比旧报告更重要,所以应该先报告):

+ Reports
    + NEWLY ADDED REPORT for APRIL
    + Report for MARCH
    + Report for February
    + Report for January

当然可以移动报告(https://community.atlassian.com/t5/Confluence-questions/In-Confluence-how-can-I-reverse-the-order-of-our-Meeting-Notes/qaq-p/385516),但我现在正在寻找一种自动化方法。所以我正在寻找以下其中一项:

1 个答案:

答案 0 :(得分:0)

好的,终于找到了它是如何工作的。万一有人有类似的问题:

curl -X GET "https://confluenceServer/pages/movepage.action?pageId=TheIdOfThePageToMove&position=above&targetId=idOfOtherPage" -H "authorization: Basic base64encodedUsernameAndPassword" -H "x-atlassian-token: no-check"