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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.