If you use the GUI to add an attachment to an existing Issue’s comment, then use the v3 REST API to GET and inspect that comment’s ADF structure, you’ll see it’s nothing like that.
Hi @sunnyape Thanks for your answer!
You are correct, I inspected and debugged to find out that is media Id. But the real issue is how to get that id “6e7c7f2c-dd7a-499c-bceb-6f32bfbf32b5”, the attachment metadata only return s.t like this:
Ahh, well, now I have the bad news for you. That id of that attachment needs to be looked up via the ‘Media API’, as per the ADF documentation:
Attributes
id is the Media Services ID and is used for querying the media services API to retrieve metadata, such as, filename. Consumers of the document should always fetch fresh metadata using the Media API.
BUT… Atlassian don’t allow public access to that API, as per this thread, so you can’t get that id.
HOWEVER… there are some workarounds, as per this thread.
This is one of those ‘catch 22’ situations with the v3 REST API and ADF where you can’t achieve the outcome described in the documentation, and where it’s better to use the v2 REST API until all the issues with v3 and ADF are sorted out.