Forums

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

Fail to batch create issue with JIRA REST API

Mark May 31, 2018

We have a PowerShell script to generate JIRA issue. It works every time we create single issue only.

Then we add a for loop to generate several issues at a time. But the script will be hang after the first or second loop. 

Because it just hang, no error at all. Do you have idea why is that? Is JIRA have some threshold to prevent calling its API too frequency?

2 answers

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
May 31, 2018

Hello,

There is no such limit. Try to use the POST /rest/api/2/issue/bulk. This Rest call will let you add multiple issues. You can find more info here:

https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-createIssues

1 vote
Danyal Iqbal
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.
June 1, 2018

It's difficult to say anything without having a look at the PS script, the for loop and the response from Jira.

I believe your for loop is incorrect.

Is JIRA have some threshold to prevent calling its API too frequency?

Not really, the requests to REST endpoints are queued. Any reasonable frequency should not be an issue. We had no issues with 1000 request per minute (nginx+tomcat+jira). You can alway add a delay in your for loop to eliminate this issue, but I doubt it will help.

Mark June 3, 2018

Thanks. I found there is a bug in PowerShell old version. It cannot clear the old connection properly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events