Forums

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

Please assist with creating a Jira ticket using Jira Rest API and assign a user to the ticket.

Magdeline Mabusela
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 3, 2023

Good day 

 

I am trying to create Jira tickets using JIRA REST API. I would like to assign a user using a username("assignee":{"name":"charlie"}) not the user account ID

("accountId": "5b10ac8d82e05b22cc7d4ef5").

How can i achieve this ?

Which url do we use to achieve this, because I see the link is different when assigning an issue?

check this link and the image on the Assign an issue to a user part

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/ 

 2023-08-03 13_41_15-Jira REST API examples2.png

2 answers

0 votes
Magdeline Mabusela
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 4, 2023

For the Jira server how do you assign the ticket to the username?

Which url do you use?

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2023

HI @Magdeline Mabusela 

See my answer below.

The mention of accountId in your question tells me you are using Cloud or are you on server?

You can't use the API's from server to cloud, cloud only works with accountId

Jira Server (EOL 02/2024) or DC are self hosted solutions.

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2023

Hi @Magdeline Mabusela 

The link you are using for the example is for Jira server.

I think you are on Cloud. within cloud based on Atlassian security policy, you can only use the accountId

Issue creation via Cloud Rest API.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-posthttps://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events