Hi,
I want to check (in Java) if an attachment with a given filename already exists in my entire Confluence system. I was able to perform a V2 search and limit the results by ContentType, but how can query for a specific attachment name? What type of Query Object do I have to use and how would the constructor look like?
Thanks
Thorstne
If you just need to know if the attachment exists in the instance you can query the database with a query like this, which worked on my PostgreSQL db:
select * from content where contenttype = 'ATTACHMENT' and title = '<filename_case_sensitive>';
If you need to do it in Java because of a solution you are building then we will have to defer to the more Java savvy members of the Community.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.