Create Project Jira Rest Call Not Working returning 400.

Chakresh Tiwari December 6, 2019

I tried to access Jira Rest Call for Creating a Project in My cloud Jira App.  

/rest/api/3/project

 And Tried to get all Project also using this rest Call But every time it Returning 400 status Code.

Here Is RequestJSON BOdy

{"key":"EX","name":"Example","projectTypeKey":"business","projectTemplateKey":"com.atlassian.jira-core-project-templates:jira-core-simplified-project-management","description":"Example Project description","lead":"Chakresh Tiwari"}

Any Suggestions where I am Making mistake what I can Correct. 

Thanks.

 

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 9, 2019

 Hello @Chakresh Tiwari

Thank you for reaching out.

The command you are trying to run (/rest/api/3/project) is deprecated on Jira Cloud REST API, so it might be not working for some Jira sites. Please, try to get all your projects by running the query below in your browser:

https://yoursitedomain.atlassian.net/rest/api/3/project/search

About the request for creating a new project:

1 - Make sure that you are authenticating with a user that is allowed to create a project

2 - Try to add the userID or e-mail address instead of the name in the Project Lead field 

3 - Make sure to use a project key that was never used before

Let us know if this information helps.

Chakresh Tiwari December 9, 2019
Hi  @Petter Gonçalves 

Thanks for Your suggestion and I tried according to that but still, it is giving the same error  I have attached the screenshot whatever I am passing in request Body Please check this and tell me where I am wrong. In response, I am getting HTML with status code 400.

<!doctype html>
<html lang="en">

<head>
<title>HTTP Status 400 – Bad Request</title>
</head>

<body>
<h1>HTTP Status 400 – Bad Request</h1>
<hr class="line" />
<p><b>Type</b> Status Report</p>
<p><b>Message</b> Claim &#39;qsh&#39; is missing.</p>
<p><b>Description</b> The server cannot or will not process the request due to something that is perceived to be a
client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
</p>
<hr class="line" />
<h3>Apache Tomcat/9.0.24</h3>
</body>

</html>

2019-12-10 (2).png

Chakresh Tiwari December 9, 2019

Hi @Petter Gonçalves 

I want rest call for creating a project not for getting all project can you please suggest which rest call??

Suggest an answer

Log in or Sign up to answer