Add Attachments from a Node to an Issue

Use this endpoint to add any attachments from a question, answer, or comment added after the question was submitted to JIRA as an issue/ticket.



Permissions & Notes:

Make sure you have read the JIRA Integration Documentation in the Get Started, Integrations and Plugins Section before trying out the endpoint. There are specific steps and permissions needed to be able to see results from the endpoints in your AnswerHub instance.

Sample Request

A POST Attachments from a Node to an Issue request to add attachments from a specific comment node (node=873) to a specific issue/ticket in JIRA (ID=69314) to using a human-readable Username/Password (answerhub/test123) would look like the following cURL request below:



You can extract the issue-id/jira-id (they are the same), from the following GET endpoints responses:

  • /services/v2/jira/node//ticket.json

  • /services/v2/jira/key//ticket.json

In the example request below, the user demo4 commented (ID:873) on the question (ID:872) and included an attachment you want to add to the ticket in JIRA. To add the attachment, you will need to make a request to retrieve ticket info by Jira key to obtain the issue-id, which the system will label as jira-id in the response and you will need to obtain the comment node id.

 -u user:password 
 -H "Accept: application/json" 
 -H "Content-type: application/json" 
 -X POST ""

Expected Response: HTTP 200 - OK

        "self": "",
        "id": "60107",
        "filename": "user-interface-expertise-doc-screenshot-2019-02-21.png",
        "author": {
            "self": "",
            "name": "JIRAadminusername",
            "key": "JIRAadminusername",
            "accountId": "5b087cccc83b765e4c37d5f1",
            "emailAddress": "[email protected]",
            "avatarUrls": {
                "48x48": "",
                "24x24": "",
                "16x16": "",
                "32x32": ""
            "displayName": "[email protected]",
            "active": true,
            "timeZone": "America/New_York"
        "created": "2019-02-21T11:18:27.027-0500",
        "size": 284573,
        "mimeType": "image/png",
        "content": "",
        "thumbnail": ""

Community User Interface Result

You can see the question and comment here and the JIRA status in the right side panel

Request Sample Without Having the Permission to Attach a File

-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST ""

Expected Response: HTTP 403 - Forbidden

"error":"Attachments is disabled or you don't have permission to add attachments to this issue."
Click Try It! to start a request and see the response here!