Forums

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

How to get all pages in same order as looks in Confluence.

Javed Iqbal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 6, 2021

I am using the Confluence API to retrieve all pages in a space. Below API endpoint returns the pages but not in required sorted order.

rest/api/space/ABC/content?start=0&limit=1000&expand=ancestors

 

1 answer

0 votes
Hana Kučerová
Community Champion
August 6, 2021

Hi @Javed Iqbal ,

welcome to the Atlassian Community!

You should be able to add order by parameter, something like:

start=0&limit=1000&expand=ancestors&orderby=title asc
Javed Iqbal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 9, 2021

I think you have not getting my point. I want to get all pages in a same order as looks in confluence. I want exact field name on which confluence sorts their pages.

I have tried orderby=title asc its not working.

Hana Kučerová
Community Champion
August 10, 2021

Hi @Javed Iqbal ,

unfortunately it looks like it is not possible. The only ordering I was able to make work is the title ordering and only with usage of endpoint:

/rest/api/content?spaceKey=ABC&start=0&limit=1000&expand=ancestors&orderby=title asc

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events