Forums

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

Is it possible to create new project in Jira through Rest APi in Postman?

CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
August 3, 2023

I'm learning Rest Api's in Jira now .

i want to know is it possible to create a project in Jira with Rest API.

i got a code through Chat Gpt and tried to do that but got some error .

in body i mention like this 

 

{
  "key""ATP",
  "name""Akshith Test Project",
  "projectTypeKey""software",
  "lead": {
    "key" : "61f93c0fb3ec760068c11a32"
}
}
getting following error 
  "Invalid request payload. Refer to the REST API documentation and try again."
    ]
i used post method to do this and i'm Jira admin i have a permission to create new project

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Champion
August 3, 2023

Hi @CHINNAMUTHEVISAI.SATYANARAYANASHARMA ,

sure, you can. Please take a look to the following documentation https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post

There are some missing parameters in your request.

Fabio

CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
August 3, 2023

Thanks Fabio for your help.

 

even after mentioning all details i got error that error parsing Json , check your body is valid error.

i added this code in the Body

 

`{
  "assigneeType""PROJECT_LEAD",
  "avatarId"10200,
  "categoryId"10120,
  "description""Cloud migration initiative",
  "issueSecurityScheme"10001,
  "key""EX",
  "leadAccountId""61f93c0fb3ec760068c11a32",
  "name""Example",
  "notificationScheme"10000,
  "permissionScheme"0,
  "projectTypeKey""business",
  }`;

i want to remove avatar id from that as we dont user Avatars more .

 

can you help me ?

Taha El Majidi
Contributor
August 3, 2023

@CHINNAMUTHEVISAI.SATYANARAYANASHARMA ,

Did you check if the user you are using has the permission to create projects ?

CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
August 3, 2023

Hi Taha,

Yes User is an Org admin and he have a permission to create project.

Taha El Majidi
Contributor
August 3, 2023

@CHINNAMUTHEVISAI.SATYANARAYANASHARMA ,

What's the error code you are getting ?

CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
August 7, 2023

Hi Taha,

I'm able to create a project through Rest API

i used below code.

 

{
"key""SOF",
 "name""Software Sample",
 "projectTypeKey""software",
 "projectTemplateKey""com.pyxis.greenhopper.jira:gh-scrum-template",
 "description""Example Project description",
 "leadAccountId""61f93c0fb3ec760068c11a32",
 "assigneeType""PROJECT_LEAD",
 "avatarId""27370"
 }'

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events