Forums

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

Getting Project Statistics by IssueType

Jogin Joy April 24, 2020

Hi,

 

Im working with a Jira Server Platform.

What im trying to get using the rest API is a statistics of projects. Meaning i want to get the count of each issueType categorized by the project.

Is there an easy way to do this? Tried out a couple of ways to achieve this but the data is just too much.

Or is there some way i can get all projects with a filtering instead of getting all projects at once from the /project rest API 

1 answer

1 accepted

0 votes
Answer accepted
Mohamed Benziane
Community Champion
April 24, 2020

Hello @Jogin Joy 

You can use a dashboard and the pie chart gagdet to retrieve the data you need.

pie chart.png

pie chart 2.png

Jogin Joy April 24, 2020

@Mohamed Benziane Thanks for the quick response. This looks like the result i want but just a quick question - can this be consumed via the REST API because i didn't find one in the doc. I want it that way so that we can use it in one of our internal application

Mohamed Benziane
Community Champion
April 24, 2020

Yes it's possible, use this api

rest/api/3/search?jql=project=yourprojectkey

It will retrieve all issue for the project, then you need to iterate over each issue and find the issuetype.

Don't forget to use the parameter startAt and maxResults 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-rest-api-3-search-get

Jogin Joy April 24, 2020

Thanks again. 

I have already tried this out. The problem I have with this api is that for one or a few projects this works fine. But the internal application we have needs to create this for all projects in our JIRA server. This amount of data is huge and hence have problems processing it. So was just wondering if there is an API which does this evaluation in a single call on the JIRA server side itself. 

For cloud platform i have noticed that they have an API /expression/eval. But could not find anything similar for the server platform. 

Mohamed Benziane
Community Champion
April 24, 2020

I don't think it's possible in one API call unfortunately.

Suggest an answer

Log in or Sign up to answer