Creating an issue error using REST API: "project is required"

Wesley Guthrie August 10, 2017

I'm trying to create an issue using the REST API. I've looked through several examples and videos and cannot find what I could be doing wrong. I keep recieving a 400 Bad Request error...

I'm running the following method:

http://localnet:8080/rest/api/2/issue/

This is my code:

{
"fields": {
"project": {
"key": "TP"
},
"summary": "TEST API",
"description": "Test Description",
"issuetype": {
"name": "Task"
}
}
}

This is what I recieve back: 

{
"errorMessages": [],
"errors": {
"project": "project is required"
}
}

 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2020

Hey all,

In order to make sure the Community sees additional questions you might have about errors like this (which may have varying causes), please ask a new question here on the Community so we can help you individually and ensure that your question is viewed by users actively looking to answer new questions.

You can use this link to quickly ask a new Jira question.

Cheers,
Daniel | Atlassian Staff

0 votes
Dobrivoje Prtenjak January 30, 2020

I'll provide source code later, however, please see what I've done here : https://stackoverflow.com/a/59981597/1551368

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2017

Your JSON looks ok, so I suspect that either project TP does not exist or the user you are logging in with does not have permission to create issues in it.

Pavani Vellal November 15, 2019

I am seeing the same issue. My json is find and I have a valid project key but still shows me the same error. What are all of the possible reasons for this error?

Like Samuel Volin likes this
jack jill December 12, 2019

Hi Pavani, am facing the same issue as well, did you figure it out what was causing the issue? If so please let me know.

Bharat_Kumar February 5, 2020

Hi, I also facing the same problem please let me know how to resolve this problem.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question