Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I create multiple issues with one REST api call?

Wouter Batelaan February 12, 2013

I want to import a lot of issues, and in future edit lots of issues efficiently.

Using one URL per issue would seem very slow.

Is there a way to execute multiple create/edits with one REST api call?

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Aleksander Mierzwicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2013

Hi Wouter,

I have a good and bad news for you ;). So the good one is that recently we've added possibility to batch create issues via REST. The bad news are that this will be available in 6.0, and there is no method for editing many issues.

So, for now there is no possibility to create/edit multiple issues in one call :(. But creating wil be available soon :).

Cheers,
Alek.

1 vote
Damien Davis October 18, 2017

Here is a sample post:

hostname/rest/api/issue

Body:

{
"issueUpdates": [
{
"update":{},
"fields": {
"project":
{
"key": "TDP"
},
"summary": "REST ye merry gentlemen.{{$timestamp}}-{{$randomInt}}",
"description": "Creating of an issue using project keys and issue type names using the REST API",
"issuetype": {
"name": "Bug"
}
}
},
{
"update":{},
"fields": {
"project":
{
"key": "NPAD"
},
"summary": "REST ye merry gentlemen.{{$timestamp}}-{{$randomInt}}",
"description": "Creating of an issue using project keys and issue type names using the REST API",
"issuetype": {
"name": "Story"
}
}
},
{
"update":{},
"fields": {
"project":
{
"key": "NPAD"
},
"summary": "REST ye merry gentlemen.{{$timestamp}}-{{$randomInt}}",
"description": "Creating of an issue using project keys and issue type names using the REST API",
"issuetype": {
"name": "Task"
}
}
}
}
Brian Jones April 25, 2019

I found this required a little adjustment in order to get this to work when testing in Postman.

Make sure you use the correct POST URL for bulk changes:
/rest/api/2/issue/bulk

The very last bit of the code sample is missing a bracket.

 }
}
}
]}
Like Mohammed Abdullah likes this
0 votes
Aleksander Mierzwicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2014

Since 6.0 there is /rest/api/2/issue/bulk resource. https://docs.atlassian.com/jira/REST/latest/#d2e1627

You should POST JSON object like that to this resource:

{ "issueUpdates": [ 
  objects_like_for_create_issue_resource_here 
] }

David.Perez1 February 7, 2019

I need create issues, but this issues should be xray test type, and I need create with steps. Is it possible?

I don't know how make this. Could you help me please?

Thanks.

David

0 votes
Scott Lemmer January 8, 2014

I also have the same question.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events