Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,720
Community Members
 
Community Events
175
Community Groups

Moving pages through API - update page tree, re-position the page?

Hi,

I have a question regarding moving pages using the REST API. I've been able to do it using the update-content method, but it seems like it's not exactly perfect.

confluence.png

As you can see on the picture, the page says it's moved, but visually it stays in the same place it was originally created. Do you have any ideas as to how to overcome this? I've seen the pages update and show up in the correct place at some times, but I'm not sure whether it's a matter of time, or just updating the page tree in a different way (ie. adding new page, as this seems to update it) and would like to make it happen instantly, or at least to be able to force it through the API as well (couldn't find anything in the documentation, although it's not the best to be honest...).

 

Also additional question - is there a way to change how pages are sorted under a specific parent? Or are pages always added at the end? Because in some cases we would need the page to be on the top. If it's not configurable then how to move it via API? Because currently the page is created via third party, and the most I could do is move it, but I can't really comprehend how, there is the:
"extensions": {
      "position": "none"
}

node which I thought would do it, but I can't get it to work.

 

To be clear - I will be calling the API via PowerShell, have some scripts prepared already and hope I'll be able to finish what's required :)

 

2 answers

1 accepted

0 votes
Answer accepted
Diego Atlassian Team Sep 03, 2019

Hey there, Marcin!
I may not be the perfect match for your request, however, I have found this thread in our Community. A pretty recent thread, for that matter:

Maybe you can compare your API calls with the ones presented in the thread and check if there is anything worth improving.

To address your second question. Yes, we can reorder pages in Confluence Cloud. There is also a thread about our recent change applied to page order. You can have a peek here, Marcin:

However, there is no method to reorder pages via the REST API. You can check a reported Feature Request about it here:

Hope this helps you out, Marcin! Looking forward to your reply.

Hi Diego,

Thanks for the response, I saw the first question originally, but thought this could be resolved in a different way and I wouldn't have to use a workaround, but I guess this will be fine for now.

As for the order of the pages however - is this change of yours already taken back? Because every page created on our confluence ends up at the bottom, and I don't see an option to change it, I only can make it alphabetical where it was modified manually, it would be great if there were options to set for example - create all pages under this parent at the top, but do it alphabetically otherwise, because it's not always needed to be the same way.

I hope there will come an option to change it via REST API, or configuration that will handle it, so we wouldn't need to do it manually.

 

I'll accept your answer since it seems the workaround is the only way currently, and there's no way to re-order via API currently so not expecting anyone to answer differently :D

@Marcin Adamski This has been due to new drag and drop and I have already reported below bug for the same: https://jira.atlassian.com/browse/CONFCLOUD-67046

There is an API call which should do everything you want: Move position 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events