Hi there,
I'm trying to use REST API to get all the JIRA issues for the Hive projects but got inconsistent results with two REST API requests.
The first one is to get ALL the JIRA issues from Hive projects:
https://issues.apache.org/jira/rest/api/2/search?jql=project=Hive
The second one is to get the Hive JIRA issues that contains `Zookeeper` keyword:
https://issues.apache.org/jira/rest/api/2/search?jql=project=Hive+and+(summary~'Zookeeper'+or+description~'Zookeeper')
However, I found that some issues from the second request are not included in the first one. Shouldn't the first one return ALL the JIRA issues and include all the issues from the second one?
Is there any mistake I made that caused this to happen?
One inconsistent example is issue `HIVE-23715`, which is returned by the second request but not the first one.
Hi @Shuai Wang
I think the queries are OK but keep in mind these return paged results. By default you will only get 50 results at once.
Any chance you are only looking at the first 50?
Look at the beginning of your response:
{"expand":"schema,names","startAt":0,"maxResults":50,"total":27985
You can set the maxResults parameter to another number or use the startAt parameter to go through the different pages.
https://issues.apache.org/jira/rest/api/2/search?maxResults=2000&jql=project=Hive
Thank you so much for your reply.
I've tried to set the maxResults with a larger number, 5000, for both requests.
https://issues.apache.org/jira/rest/api/2/search?startAt=0&maxResults=5000&jql=project=Hive
The beginning of the new response is like this:
{"expand": "schema,names","startAt": 0,"maxResults": 1000,"total": 27985
But the `HIVE-23715` is still not there. Is there anything else I missed?
Is this `maxResults (1000)` a subset of `total (27985)`? Also why it returned `1000` when I set the `maxResults` to 5000?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
There is a hard total of 1000 max results and you can not override it yourself. So you'll need to use the startAt=1000 parameter to get the next 1000 results.
Or you can get creative and sort the results by key in descending mode to get your HIVE-23715 earlier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.