Create new project via rest api over https

ofer hai March 18, 2015

Hi,

I'm pretty new beginner with Jira REST api.

I've managed to compose a simple .net program that fetches a list of projects and issues.

My current task is to create a bridge via our own propriety projects managements system and Jira, therefore i need to be able to query projects,create projects and sub projects and report hours and assigned resources.

Are all the activities I've described are supported by REST api?

If you have links and maybe some examples how to, it would be great smile

 

Kind regards,

Ofer S. Hai

 

7 answers

1 vote
Nader Hadji Ghanbari June 6, 2016

Create Project is indeed supported now by the JIRA REST API:

https://docs.atlassian.com/jira/REST/latest/#api/2/project-createProject

0 votes
AshishUpadhyay July 16, 2018

A sample of REST API to create project.

Create Project in Jira
===================
HTTP method: POST
https://<companyName>.atlassian.net/rest/api/2/project

User-Agent: Fiddler
Host: <companyName>.atlassian.net
Authorization: Basic YZNdaXNoMnVwYWToeqF5QHF1eXBtZW50pmlHOjIyY0gwRGJETW1hZGdJcnhCVH5NR7MJQg==
Content-Length: 176
Content-Type: application/json

Body
{"key": "FAPI",
"lead": "admin",
"name": "FromAPI",
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-simplified-kanban",
"projectTypeKey": "software"}

 

You need to have token to access REST API. You can get it from Jira itself.

Hope this helps!

Bruce Chen March 6, 2019

Tired both v2 and v3 with the sample body payload and didn't get through.  The error showed:

{
"errorMessages": [
"You must have global administrator rights in order to modify projects."
],
"errors": {}
}

However, I was able to create a 'next-gen' (not classic)project through the UI.  With the limited rights, any chance I can create project by using REST at all?

Sunil Singh May 21, 2020

any luck creating project whenever, I do I keep getting, following error:

{StatusCode: 400, ReasonPhrase: '', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
ATL-TraceId: 3469dd6db518f35e
X-AREQUESTID: a3c279a0-c613-4ca9-9014-68020009f304
X-AACCOUNTID: 5d9c784b45fad00dc1261cf1
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked
Timing-Allow-Origin: *
X-Content-Type-Options: nosniff
Micros-Issuer: micros/edge-authenticator
Connection: close
Expect-CT: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400
Cache-Control: no-store, no-transform, no-cache
Date: Fri, 22 May 2020 02:58:54 GMT
Set-Cookie: atlassian.xsrf.token=fb415e15-0205-48ba-b4f2-84da32e6dedb_7a20f41075af6f3e3deabaa2bf29b773bc0c2fcf_lin; Path=/; Secure
Server: AtlassianProxy/1.15.8.1
Content-Type: application/json; charset=UTF-8
}}

0 votes
AshishUpadhyay July 10, 2018

You can create project using REST Api. Navigate to below URL.

https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-project-post

0 votes
SPence June 1, 2015

Are there any plans to add the ability to create a project to the API?

AshishUpadhyay July 16, 2018

Its added in the latest release. See my comment below.

0 votes
清水裕子 May 24, 2015

I found a method to create new project on the following page.

https://jira.atlassian.com/rpc/json-rpc/jirasoapservice-v2/createProject

Isn't Create Project method available now (or not implemented yet) ?

0 votes
ofer hai March 18, 2015

Can i create issues and tasks via REST api ?

Can i assign an issue to a sprint ?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2015

Yes. Assigning issues to Sprint needs JIRA Agile REST APIs. It is not public but you can figure it out from the calls using Firebug or Chrome developer tools and use them.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2015

Methods like create project are not exposed via REST API. See https://docs.atlassian.com/jira/REST/latest/ for the full list of supported methods.

Suggest an answer

Log in or Sign up to answer