How to properly format json issue with attachment?

Paulo Pinho September 4, 2015

Hi!

Could anyone say how can I post an issue with attachment using a JSON format? or at least how to add them to an existing issue? please, no curl commands.

My current headers are:

X-Atlassian-Token:nocheck
Content-Type:application/json

my test JSON is:

{
    "fields": {
        "project": {
            "key": "KEY"
        },
        "summary": "Title",
        "description": "Text",
        "issuetype": {
            "id": "1"
        },
        "priority": {
            "id": "1"
        },
        "attachment": [
            {
                "filename": "screenshot.png",
                "mimeType": "image/png",
                "content": "http://pathtoscreen/screenshot.png"
            }
        ]
    }
}

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Rodrigo Rosa
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 7, 2015

Hello Paulo,

Please check this previous post, which might help you achieving that.

Regards,

Rodrigo Rosa

TAGS
AUG Leaders

Atlassian Community Events