Forums

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

Specify a valid project ID or key when trying to create an issue of type task

Ashutosh
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!
January 12, 2023

I am trying to create an issue in jira via postman and always getting this error - Specify a valid project ID or key when trying to create an issue of type task

 

Request --> 

image.png

image.png

 

The issue type references a Task.. below is the information about the issue type returned from callout to https://iamashutosh.atlassian.net/rest/api/3/issuetype

 

image.png

I have also tried setting project id to SF01 (Project key) but even that doesn't work. 

 

I even tried changing it to "project" { "key" : "10001"} and also "project" { "key" : "SF02"} but none of these combinations seem to work and I'm getting the same error over and over again.

 

Any help would be much appreciated. Thanks! :) 

1 answer

1 accepted

1 vote
Answer accepted
Ashutosh
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!
January 12, 2023

I was able to fix the issue.. the issue was because of incorrect structure of data being passed. Pls see below updated structure of data being passed that fixed the issue.  

 

{
"fields" : {
"summary": "Create JIRA issue",
"issuetype": {
"id": "10004"
},
"project": {
"id": "10001"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "This is the description.",
"type": "text"
}
]
}
]
}
}
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events