Forums

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

How to get the issue count using the customfield using the REST API?

Senthil V March 6, 2019

I have code in Python jira module to get the issue total count for particular customfield like below,

from jira import JIRA

field_id=cf[xxxxxx]

got = 1000
total = 0
while got==1000:

   JQL="%s is not EMPTY order by updated"%(field_id)
   issues = jira.search_issues(JQL, startAt = 0, maxResults=1000, fields="issue key") 
   got = len(issues)

Using the while loop i have counted till end of the total. The above code is taking more then an hour to fetch the total count of issue for particular customfield. 

The same need to done in REST API, i need to know whether its possible to collect the same issue count in restapi or not. If possible kindly suggest the restapi call using the CURL command.

 

 

1 answer

0 votes
Aleksandr Zuevich
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 6, 2019

Hi,

 

If you just need to know total issue count you can invoke GET /rest/api/2/search once and take total field.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events