It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Feb 07, 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

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.

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?

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.

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

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you