Receiving 400 Bad Request when assigning issue via JIRA Rest API Edited

Hello all, 

I am trying to make a PUT request for assigning an issue to a user and am running into a 400 error when doing the following:

PUT on <localhost>/rest/api/2/issue/<issue_id>

PAYLOAD: {"fields":{"assignee":{"name":"___"}}}

Alternatively, I have also tried with the following endpoint:

PUT on <localhost>/rest/api/2/issue/<issue_id>/assignee

PAYLOAD: {"name":"_____"}

And have gotten the same 400 response. 

I already have my permissions set so that any logged in user can assign issues, so not too sure what the problem is. Have been doing POST requests to update an issue's status, and to add comments - those requests work fine, I just seem to be running into this issue with assignees.  

Another strange problem is that if I make the following request:

PUT on <localhost>/rest/api/2/issue/<issue_id>/assignee

PAYLOAD:{"emailAddress":"____"}

This returns a 204, but assigns the issue to the logged in user, instead of the individual specified in the payload. 

Any help would be appreciated - thanks!

1 answer

1 accepted

This widget could not be displayed.
Alexey Matveev Community Champion Dec 20, 2017

Hello,

There must be a json returned with a detailed description of the error. Could you also provide it?

In the name field for the assignee you should provide the name of the assignee, not the display name of the assignee

Aha, that was the problem - was using the display name. Thanks! 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

72 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you