Jira HTTP bad request "Project is required"

Hi I am getting an error 

HTTP Bad request 400

(  "Errormessages " : [], "errors":("project": "Project is required"))


my curl command=

curl -D- --user POST --data @C:\Adwait\AdwaitWorkspace\WS2\Login\jira\createJiraIssue.json -H "Authorization: Basic Yuuuuuu" -H "Content-Type: application/json" "http://xxxxx/rest/api/2/issue" -k -o C:\Adwait\AdwaitWorkspace\WS2\Login\jira\createJiraIssue-Output.json


my json=

"key":"DevOps_Touch & Feel (DF)"
},"summary":"Performance test","description":"","environment":"","assignee":{"name":"A","emailAddress":"emailid_assignee"},"issuetype":{"name":"Bug"},"labels":["Automation"],"customfield_10222":[{"value":"Test1"}]}}

2 answers

This widget could not be displayed.
"project": {
    "key":"DevOps_Touch & Feel (DF)"

That is definitely not the Project Key, looks more like the Name.

yes that is the name. What do i need to give as key?

Well.. the Project Key, obviously.

ASDDDD or REWR or RQW in the following example


This widget could not be displayed.

Were you able to resolve it, Even after adding key , I am getting issue

JSONObject fields = new JSONObject();
JSONObject project = new JSONObject();
project.put("key", "1");
project.put("id", "intqm");
//fields.put("project", "1");
// fields.put("issuetype", new JSONObject().put("id", issuetypeid.toString()));
// fields.put("summary", "Test from JiraRestClient");
//fields.put("description", "Lorem ipsum...");

JSONObject issue = new JSONObject();
issue.put("fields", fields);

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

154 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you