Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to find the exact Jira Issue related to attachment via API

I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Nov 08, 2023

We use Jira Webhooks to send issue-related data when an event occurs.

The problem is that in the 'attachment_created' webhook event JSON we receive, there is no information about the issue. I

s there any way to find the exact issue ID when you receive 'attachment_created' data, apart from querying and crawling all issues?


The actual webhook data!

We are recieving the same data when we try it using the API using

Why everything in Jira is so messed up...

  "timestamp": 1699047222230,
  "webhookEvent": "attachment_created",
  "attachment": {
    "self": "",
    "id": "10003",
    "filename": "cisco_switch.jpeg",
    "author": {
      "self": "",
      "accountId": "712020:f5defdeb-2e9d-4316-86f0-191123ae80ed",
      "avatarUrls": {
        "48x48": "",
        "24x24": "",
        "16x16": "",
        "32x32": ""
      "displayName": "dkatrandzhiev",
      "active": true,
      "timeZone": "Europe/Athens",
      "accountType": "atlassian"
    "created": "2023-11-03T23:33:42.230+0200",
    "size": 4585,
    "mimeType": "image/jpeg",
    "content": "",
    "thumbnail": ""



1 answer

0 votes
Oday Rafeh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Nov 08, 2023

Hi @dkatrandzhiev , 

When dealing with Jira Webhooks and the attachment creation event, a frequent hurdle is that the webhook payload does not provide specific details about the corresponding issue. The following steps can help you utilize the Jira REST API to determine the issue that an attachment is associated with:

Capture Attachment ID: From the webhook data, capture the attachment ID.

Use the REST API: Perform a GET request to the attachment/{id} endpoint, which provides the attachment metadata, including the issue ID.

Here's a general outline of the API call you would make:

GET /rest/api/2/attachment/{attachmentId}

This will return information about the attachment, including the issue or content URL, which should have the issue key within it.

However, based on your message, you're saying that even when using the API endpoint to get the attachment information, you're not receiving the issue ID. This seems unusual, as the API should return the issue ID in the response

Another approach, if feasible in your situation, is to modify your Jira workflow and add a custom webhook event that triggers upon attachment creation, which includes the issue key in the payload. This requires custom development and administrative access to the Jira instance.


Hope My answer Helped. 

Kind regards,

Oday Rafeh

I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Nov 08, 2023

Thank you very much for the advices!

Yes, I've tried it many times and the API request to 


returns the same data in JSON format as the actual webhook. 

I'll try with Jira workflow. 


Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events