It is quite simple to automatically create a new page in confluence by using the REST API (How to create new page in Confluence using their REST API?).
However this adds the newly generated site to the bottom of the page hierarchy/Page navigation, like so:
+ Reports
+ Report for January
+ Report for February
+ Report for MARCH
+ NEWLY ADDED REPORT for APRIL
Still, it would be preferable to have the reports the other way round (the newest report is more important then the older ones, so it should come first):
+ Reports
+ NEWLY ADDED REPORT for APRIL
+ Report for MARCH
+ Report for February
+ Report for January
Of course it is possible to move reports around (https://community.atlassian.com/t5/Confluence-questions/In-Confluence-how-can-I-reverse-the-order-of-our-Meeting-Notes/qaq-p/385516), but I'm now looking for a way to automate this. So I'm searching for one of the following:
- A JSON parameter that could be added to the REST call that creates the new page with the report - and that allows me to specify that the page should be added in the beginning and not to the end. (Preferred way)
- A REST command that allows me to do (https://community.atlassian.com/t5/Confluence-questions/In-Confluence-how-can-I-reverse-the-order-of-our-Meeting-Notes/qaq-p/385516) autonomously.