When I am making a GET request to the endpoint:
'https://<MY_FIRM_NAME>.atlassian.net/wiki/rest/api/content/<page_id>/child/attachment'
Then I am getting all the attachments that were ever linked to that confluenced doc.
Initially I had 5 documents in total. But now I deleted 3 of them. Hence, in the final result, there should be only 2 elements in the json array response. But it is giving all 5 elements without any field which can be used to distinguish between available and deleted attachments.
Can someone help in this one? I am stuck, as I don't want to read the attachments that have already been deleted.
Thanks in advance !!
Hi @Soumita ,
Question—have you deleted those files from Attachments section as well, or only from the page via page editor?
If you do this, does REST API still return 'old'/deleted attachments?
There's also one feature request which might be relevant to this: CONFCLOUD-16577: Ability to detect unused attachments > it's quite old though, but if you scan comments, you might find something useful đź‘€
Cheers,
Tobi
Hey @Tomislav Tobijas , thanks for a quick turnaround.
I deleted the 3 docs from the page editor only.
I am able to see the below options, as depicted in the screenshot. The Attachments option isn't visible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Soumita click on this info button ('Show more') and you should see the screenshot I've pasted above + link for attachments.
Or, you could use a direct link such as:
https://<site-name>.atlassian.net/wiki/pages/viewpageattachments.action?pageId=<page-id>
*just replace <site-name> and <page-id> with your values
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Tomislav Tobijas
Yes, I am able to see that it's showing 5 attachments in the info tab.
So, basically even if the document is deleted from the page editor, it remains in the attachment list.
Thanks a lot for the clarification.
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.