JIRA REST api for Create Project (Version - v7.6.0)

Hi All

I am trying to create a project using REST api using a sample java program. It keeps giving me 400 error. I have tried the GET api and i am getting back the projects.

I have installed locally on my laptop and the java code is also running on the same. running

Not sure if there is anything wrong with the way I am forming the json , below is the json

{"key":"INEMP","name":"EMPMGMT","projectTemplateKey":"com.atlassian.jira-core-project-templates:jira-core-project-management","projectTypeKey":"business","lead":"ramesh.k@indusedge.com","assigneeType":"PROJECT_LEAD","notificationScheme":"10000","permissionScheme":"0","url":"http://atlassian.com","avatarid":"10324","categoryId":"0","description":"projfromcode","issueSecurityScheme":"0"}

I have not created any schemes for notification, issue or permissions. For avatarid I gave the id which I saw from my GET response to projects. I am not sure about category so gave it as 0.

Please Help

Thanks

 

1 answer

Hello Ramesh,

 

I ran a REST call to create a project with your JSON data and it does give me a 400 error too. I inspected the response it gave me and it says the field "avatarid" is unrecognized. The correct field is "avatarId".

 

After that, I had to chan the avatarId value to have something that exists on my instance, and do the same for the lead. I also had to remove the fields "issueSecurityScheme" and "categoryId", it didn't seem to like the fact that the id was 0. It worked after that.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

213 views 0 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you