Forums

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

making a project with JIRA rest API. getting an Error as a response. But don't know the solution.

Sufficient Monk January 1, 2022

I am running Jira on docker. And making a simple rest API call to make a new project.
But I am getting an error "You must specify a valid project lead".
I AM indeed specifying a valid user called "userOne" that I have made on my server.
Can someone help me out what the problem is? 
I have attached a picture of the POST request that I am making and the response that I am getting. doubt5.png

2 answers

0 votes
Radek Dostál
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.
January 2, 2022

Try userkey instead - Jira mixes username and userkey here and there, and sometimes it's not clearly documented either. I think the userkey is not visible from the web interface though, but <JIRAURL>/jira/rest/api/latest/user?username=userOne should return json with the userkey in it. Probably will look something like JIRAUSER12345

Oh found this, kinda explains the key/name confusion https://jira.atlassian.com/browse/JRASERVER-68189

Sufficient Monk January 2, 2022

Hey. I tried your solution, and it unfortunately didnt work for me. I made a user that  had the ID which can be seen under "lead".
But i get the same error again.
doubt 7.png

0 votes
Fabian Lim
Community Champion
January 1, 2022

Hi @Sufficient Monk

Is "userone" an active jira user in your instance?

Regards

Sufficient Monk January 2, 2022

Yes. When I filter for Active users, userOne comes up in the results

Suggest an answer

Log in or Sign up to answer