I'm aiming to delete duplicated attachments from a Confluence instance using the rest API. There are multiple duplicated files which are attached to pages but not visible on the page, and not being used, hence we're looking to delete them.
Is there a field which can be used with the rest API to identify attachments which are attached to a page but don't appear on it?
Welcome to the Atlassian Community!
All attachments are visible on a page, if the person looking has permission to see the page.
I think you mean "does the page include a 'show attachment' macro/function so the attachment is partially or fully rendered when viewing the page".
It is a technical quibble on the wording, but it is important because the answer to "is an attachment visible on a page" is simply "yes".
I think the answer you are looking for is "not easily". You would need to search all of your page content for the macros that make attachments render on the page, and bear in mind that a most of those macros do not limit themselves to "file attached to the current page" - most can draw in attachments from other pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.