Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to pull Comment Attachments with the Rest API?

Hi, we are building an integration process between our Jira Service Desk instance and another support platform.... We've managed to build automation rules that trigger some events and using the Rest API we pulled the necessary information to push it into the other platform. 


Unfortunately with the comments, although I'm detecting that the body it's composed of text, images and/or files, I'm not being able to actually pull the content of the file because the ID given in the comment section doesn't match the attachment's ID and I can't find a way to match them.

 

Here is the comment response, indicating that the body of has multiple parts: 

Comment.png

But the ID of the attachment is numeric, therefore if I search for the given ID or the occurence Key I can't find a matching file..

 

Here is the attachment response:

Attachment.pngHas anybody approached this scenario?


Thanks in advance for any help you can provide, 

1 answer

Hello @sergio_figueroa_escala24x7_com 

Can you clarify what you mean by 'pull the attachment'? The REST API can only provide metadata about the attachment, such as its size, location, ID, URL etc.

As per the documentation, the REST API cannot provide the actual data content of the attachment. IE, you can't extract the JPG picture's image via the REST API.

Hi @David Bakkers, actually you do if you interact with the "Attachment" endpoint (https://{domain}.atlassian.net/rest/api/3/attachment/{id}), but you need the actual numeric ID that you can find if you call the ".../issue/{key}" endpoint.

My problem is that although the comment indicates that has a media part (the file per se) it doesn't indicates the id of the file, rather than a GUID that I haven't been able to match with the ID therefore being unable to determine which attachment is part of the comment.

Thanks anyway for replying, I'll keep searching!!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Announcing Mindville Insight is now part of Jira Service Management!

Hello Community! We’re excited to announce that Mindville Insight’s asset and configuration management capabilities will now be integrated into Jira Service Management Premium and Enterprise plan...

755 views 12 15
Read article

Community Events

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

Events near you