how to sort the attachments using confluence rest API

Sundar sarma March 30, 2023

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/109844408/child/attachment?limit=25&start=0&expand=history

 

1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2023

Hi @Sundar sarma 

On cloud you can use the v2 rest api endpoint, which allows you to sort by created-date, -created-date, modified-date, -modified-date:

GET /wiki/api/v2/pages/{id}/attachments

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-pages-id-attachments-get

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events