While creating Issue using there is attachment but is not mandatory
https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-post
Error:
{
"errorMessages": [
"Please add the attachment"
],
"errors": {}
}
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
payload = json.dumps( {
#"update": {
# "attachment": open(attachment_file,"r")
#},
"fields": {
"project": {
"key": "MPM"
},
"summary": "Main order flow broken",
"issuetype": {
"name": "Bug"
},
'versions' : [{"name":"Release 2.1"}],
'customfield_17660' : 'MPM-838',
'customfield_16759': {'value':'SIT',"id":"19890"},
#'description': 'fdsfdasfsa fddsfdsfdasfdsafsdafsaddsfadsfsad'
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": jira_description[:32767],
"type": "text"
}
]
}
]
} # end of description f
} # endof fields
})