The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

"project": "Specify a valid project ID or key"

Saba Ghani
Contributor
June 10, 2021
 {    "expand""projects",    "projects": [        {            "avatarUrls": {                "16x16""https://codewetrust.atlassian.net/secure/projectavatar?size=xsmall&s=xsmall&pid=10015&avatarId=11407",                "24x24""https://codewetrust.atlassian.net/secure/projectavatar?size=small&s=small&pid=10005&avatarId=10407",                "32x32""https://codewetrust.atlassian.net/secure/projectavatar?size=medium&s=medium&pid=10005&avatarId=10407",                "48x48""https://codewetrust.atlassian.net/secure/projectavatar?pid=10005&avatarId=10407"            },            "id""10005",            "issuetypes": [                {                    "description""A small, distinct piece of work.",                    "iconUrl""https://codewetrust.atlassian.net/secure/viewavatar?size=medium&avatarId=10318&avatarType=issuetype",                    "id""10002",                    "name""Task",                    "self""https://codewetrust.atlassian.net/rest/api/3/issuetype/10002",                    "subtask"false,                    "untranslatedName""Task"                },                {                    "description""A small piece of work that's part of a larger task.",                    "iconUrl""https://codewetrust.atlassian.net/secure/viewavatar?size=medium&avatarId=10316&avatarType=issuetype",                    "id""10003",                    "name""Sub-task",                    "self""https://codewetrust.atlassian.net/rest/api/3/issuetype/10003",                    "subtask"true,                    "untranslatedName""Sub-task"                },                {                    "description""Functionality or a feature expressed as a user goal.",                    "iconUrl""https://codewetrust.atlassian.net/secure/viewavatar?size=medium&avatarId=10315&avatarType=issuetype",                    "id""10001",                    "name""Story",                    "self""https://codewetrust.atlassian.net/rest/api/3/issuetype/10001",                    "subtask"false,                    "untranslatedName""Story"                },                {                    "description""A problem or error.",                    "iconUrl""https://codewetrust.atlassian.net/secure/viewavatar?size=medium&avatarId=10303&avatarType=issuetype",                    "id""10004",                    "name""Bug",                    "self""https://codewetrust.atlassian.net/rest/api/3/issuetype/10004",                    "subtask"false,                    "untranslatedName""Bug"                },                {                    "description""A big user story that needs to be broken down. Created by Jira Software - do not edit or delete.",                    "iconUrl""https://codewetrust.atlassian.net/images/icons/issuetypes/epic.svg",                    "id""10000",                    "name""Epic",                    "self""https://codewetrust.atlassian.net/rest/api/3/issuetype/10000",                    "subtask"false,                    "untranslatedName""Epic"                }            ],            "key""CJCTP-42",            "name""C2M JIRA CONNECTOR TEST PROJECT",            "self""https://codewetrust.atlassian.net/rest/api/3/project/10005"        }    ]}

Hi 
I'm trying to create a new issue, using the meta data above. but I keep getting the error "project": "Specify a valid project ID or key"- I tried substituting the project id with XXX-234 , 50001, XXXx please help me exactly what is it looking for?

TIA

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Joseph Chung Yin
Community Champion
June 10, 2021

@Saba Ghani -

Hi Saba:

In your code, it seems to be referring to the project ID (

rest/api/3/project/10005

Is that your intended project?

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Saba Ghani
Contributor
June 10, 2021

Hi @jtyetukuri yes- but this doesn't work either.
pid.PNG

Joseph Chung Yin
Community Champion
June 10, 2021

@Saba Ghani -

Go to your project UI > Project settings > Details, you will be able to get the PID in the URL address bar from your broswer.  You should be able to use it in your script.

If you are creating an issue, then you should not specify the issuekey in your script.

Hope this helps.

Best, Joseph

TAGS
AUG Leaders

Atlassian Community Events