Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×

Forums

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

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

Wesley Guthrie
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 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-
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 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
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!
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
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!
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
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!
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

TAGS
AUG Leaders

Atlassian Community Events