Forums

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

How to get all issues [ entire dump ] of a project using Rest API or All the projects in the tenant

ChanduMohammad S December 27, 2022

Hi Folks

Have a requirement where in need help on below,

1. How to get all issues [ entire dump of Issues/Bugs/Story/Task ] of a project using Rest API or All the projects in the tenant.

2. Tried with below API, at a time able to get only 100 records. Need complete dump of records from the api call instead of making startAt=0, startAt=100 so on ...

/rest/api/2/search?jql=project=ABC&maxResults=1000

It would be much helpful if we can get any direct solution for this

 

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Champion
December 27, 2022

Hi @ChanduMohammad S ,

welcome to the Atlassian community!

On the cloud instance there is a limit on search so you can't retrieve all items in one shot. This is a limit in order to avoid perfomance issues. My suggestion is to use rest api with pagination https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro#pagination.

Hope this helps,

Fabio

ChanduMohammad S December 27, 2022

Hi @Fabio Racobaldo _Herzum_ 

Thanks for the above response, can you share an example how to use pagination for the above api call?

/rest/api/2/search?jql=project is not empty&maxResults=1000

Fabio Racobaldo _Herzum_
Community Champion
December 27, 2022

You need to use startAt=value with the offset. If in the first call you retrieved 100 tickets, the second call should have startAt=100 and so on.

ChanduMohammad S December 27, 2022

Thanks again, Hope there are no other alternates for this to get the all items.

Is there a way we can add jql filters to get items that are In Progress, Done or On Hold?

Fabio Racobaldo _Herzum_
Community Champion
December 27, 2022

you can use jql parameter at your convenience. 

Example : jql=project%3DABC%20and%20status%3DOpen 

Please remember to encode your jql.

Fabio

ChanduMohammad S December 27, 2022

Thanks @Fabio Racobaldo _Herzum_ 

I am trying to filter items via type, issuetype = Story in Query parameter its not filtering the records can you help me?

Fabio Racobaldo _Herzum_
Community Champion
December 28, 2022

hey @ChanduMohammad S ,

your econded jql should be jql=project%3DABC%20and%20issuetype%3DStory

please use your real project key instead of ABC

ChanduMohammad S December 29, 2022

Thanks @Fabio Racobaldo _Herzum_ this helps

Fabio Racobaldo _Herzum_
Community Champion
December 29, 2022

you are welcome @ChanduMohammad S 

Suggest an answer

Log in or Sign up to answer