How can I add 'assignee' to JIRA issue request via POSTMAN?

Viewed 307

No matter where I put the assignee parameter in the body of the request, it does not populate in the Issue that I'm creating in JIRA. I'm a bit new working with JIRA's REST API so my ticket request is pretty simple (not much custom fields at all -but Im working slowly getting there).

However, I believe the format/syntax is right because I'm not getting an error parsing JSON message error in the response. And the ticket is still being created in JIRA even when I have 'assignee' in the body of the request. Having the 'assignee would be a neat feature to have automatically generated through the request for notifications purposes.

Can't I place 'assignee' param go anywhere on this request? I've tried in a few spots with no luck.

{
  "fields": {
    "project": {
      "key": "QA"
    },
    "summary": "Failure detected",
    "description": {
      "type": "doc",
      "version": 1,
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "type": "text",
              "text": "Failure has occurred in POSTMAN"
            }
          ]
        }
      ]
    },
    "issuetype": {
      "name": "Task"
    }
  },
  "assignee": {
      "id": ""
}
}

Which creates this ticket (Screen Shot):

enter image description here

I'm starting to use POSTMAN a lot for work and have recently transitioned from Wrike to JIRA. Ultimately, would be great to be able to fully customize a ticket through JIRA's REST API with custom_fields etc.

1 Answers

Well, I was able to figure it out. Seems like the 'assignee' parameter had to be under the 'fields' header. So, I had to move it up a bit (check below). Now once this Request is sent, it attaches the 'assignee' as I wanted. To be honest, pretty happy I was able to figure it out myself. I went through a lot of trial and error and learned things in the process.

{
  "fields": {
    "project": {
      "key": "Test"
    },
    "summary": "Failure Detected",
    "description": {
      "type": "doc",
      "version": 1,
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "type": "text",
              "text": "A Failure has occurred in POSTMAN"
            }
          ]
        }
      ]
    },
    "assignee": {
        "id": ""
      },
    "issuetype": {
      "name": "Task"
    }
  }
}
Related