Community moderators have prevented the ability to post new answers.
If you can use the REST API, then you can get the ID of an attachment. There are three different methods you could use:
You could search for the filename using the first one, or you could use the page ID for the second and third (with the third one, the id is prefixed with "att".
I would recommend using the second one, as it is the one that will be compatible with the most versions. You could either use the REST API browser available from the marketplace, or you could paste this url in your browser:
http://<your confluence site>/<contextpath (if you have one)>/rest/prototype/1/content/<pageId>/attachments?os_username=<your username>&os_password=<your password>
Just fill in the blanks with the required information and you will see the IDs for all attachments attached to that page.
I think you can get that by going to the attachments page, hovering your pointer over the attachment's name and checking the URL. I think the ID is the number 'attachments', like: https://myconfluence.com/download/attachments/11111111/attachment.png?api=v2
I hope that was what you were asking.
Jaime Kirch da Silveira.
Atlassian University is committed to providing the best training and certification for Atlassian products through on-demand classes, in-person team training, a world-class certification program, and ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events