I want to check via REST API if an attachment is used in other pages.
/rest/api/search?cql=siteSearch~'Hydrangeas.jpg' & includeArchivedSpaces=true & type IN (blogpost, page)
works for the file name "Hydrangeas.jpg" of the attachment. But that file name might be another attachment with the identical name on another page.
But regarding the "data-image-src" attribute of an embedded image (f.e. "/context/download/attachments/104956981/Hydrangeas.jpg?version=1&modificationDate=1563972519812&api=v2") I can't use this.
F.e. this will not work:
https://<removed>/rest/api/search?cql=siteSearch~104956981&includeArchivedSpaces=true&type IN (blogpost, page)