Hi,
I am trying to create a jira issue via rest api, and confused what value should be supplied in `assignee` field when I want to assign the jira to a specific user at time of jira creation itself.
My flow has two steps:
Earlier before GDPR, I use to get list of all the users via API and use the field `key` form the response for the user I want to assign.
But in latest versions `key` filed had been deprecated and new filed `accountId` is supplied instead.
Will using `display-name` as assignee value work ? or do I need to use some other api call ?
Hello Shyam,
Welcome to Atlassian Community!
When assigning an issue using REST, it's necessary to use their ID. The ID is a unique identifier that will make the issue to be assigned to the correct person.
Testing here, I believe you can use the GET all users to get their accountID.
curl --request GET \
--url 'https://site.atlassian.net/rest/api/3/users/search' \
--user 'email@domain.com:<api-token>' \
--header 'Accept: application/json'
The accountID is what appears when you access their profile on User management.
If you have any other questions regarding this matter, please let us know.
Regards,
Angélica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.