The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I order Confluence pages via the Java API

Tom Hudgins
Contributor
December 9, 2020

Hi,

I'm using Scriptrunner for Confluence to generate a hierarchy of pages based on this script: https://scriptrunner.adaptavist.com/latest/confluence/rest-endpoints.html?_ga=2.33295928.766920601.1607532354-1624645482.1587410427#_create_project_pages

This works great except that the pages that are generated are ordered alphabetically and not in the order they are in the spec structure (which lists pages to create). I know I can manually reorder pages in the UI but I'm looking for a way to enforce (or correct) the ordering to match the order in my page list (the order I'm creating them in).

Thanks for any guidance.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Tom Hudgins
Contributor
December 9, 2020

Never mind, I found it. Just need to call setPosition() on the page after I create it.

TAGS
AUG Leaders

Atlassian Community Events