Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set assignee via the API

Sandeep Vaidya September 4, 2022

1) I want to set the 'assignee' via the API. I believe I am on the cloud:
[https://company.atlassian.net/rest/api/3/user?accountId=<value>"]

2) I saw a tutorial post on one of your developer sites. It said to do a PUT with:

{
   "fields": {
       "assignee":{"name":"harry"}
   }
}

( curl -D- -u fred:fred -X PUT --data {see below} -H "Content-Type: application/json" http://kelpie9:8081/rest/api/2/issue/QA-31 )

3) If I GET on one of my issues, I don't see a 'name' field. This is what I have:
"assignee": {
"self": "https://propylon-limited.atlassian.net/rest/api/3/user?accountId=6xxxx1",
"accountId": "6....1",
"emailAddress": "sxxx.com",
"avatarUrls": {
"",
"",
"",
""
},
"displayName": "Sandeep Vaidya",
"active": true,
"timeZone": "Europe/Dublin",
"accountType": "atlassian"
},

4) I tried the put with accountId, displayName, I got this error:

{
    "errorMessages": [],
    "errors": {
        "assignee""Field 'assignee' cannot be set. It is not on the appropriate screen or unknown."
    }
}

1 answer

1 accepted

2 votes
Answer accepted
Vikrant Yadav
Community Champion
September 4, 2022

Hi @Sandeep Vaidya As per the error message it seems that Assignee field is not available on Edit screen or not editable. Are you able to set assignee manually from view screen? 
If you are able to edit assignee from view screen then kindly check this link, it has complete steps for setting assignee via REST API  :- 

https://www.ravisagar.in/videos/jira-rest-api-assignunassign-issue

 

Thanks

V.Y

Sandeep Vaidya September 4, 2022

Thanks, Vikram. That worked!!

Like Vikrant Yadav likes this
Vikrant Yadav
Community Champion
September 4, 2022

Great glad to hear it works for you 🥳🥳

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events