Hi,
I use the REST API to scan through our document libraries. However, currently the performance of my system is very slow because I have to call a function getAttachments for every page I load (and its subpages).
Isn't there a better solution, something like getting all attachments in the hierarchy of the provided page?
Or at least when getting subpages (with expand&children.page) getting also attachment titles?
Based off of this solution - Solved: REST API call to return page attachments (created ... (atlassian.com)
You can use the 'api/content/search' endpoint and pass along the following CQL query:
type = attachment and container = <PARENT-PAGE-ID>
ex: https://<SERVER>/rest/api/content/search?cql=type%20%3D%20attachment%20and%20container%20%3D%20<PARENT-PAGE-ID>&expand=container
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.