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,551,723
Community Members
 
Community Events
184
Community Groups

how to sort the attachments using confluence rest API

I am using confluence API to get attachments. i would like to sort the attachments based on the attachment name, by date, and by size.

I am using the below rest API to get attachments.

confluence/rest/api/content/{pageid}/child/attachment?limit=25&start=0&expand=history

 

1 comment

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 30, 2023

Hi @Sundar sarma ,

Seems like you're using the old deprecated Confluence REST API.

I would recommend you to use the following endpoint: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-pages-id-attachments-get

But you can't sort by name, only by different relevant dates.

I hope this helps.

Cheers,
Peter

In confluence itself there is sort by title, sorty size and sorty by creation date right.

you can observe the below screenshot.

i have to sort by filesize, title and created date as well

referring below rest api documentation

https://docs.atlassian.com/ConfluenceServer/rest/6.12.1/ - confluence rest api

 

cap1.PNG

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events