POST /v1/object/aql?startAt=0&maxResults=1000
in a results set that has about 35k records, it is returning this at the end of the 1st 1000 records:
"maxResults": 1000,
"startAt": 0,
"total": 1000,
"isLast": false,
"hasMoreResults": false,
"last": false
until quite recently, hasMoreResults would have been 'true', but is now false. This appears to be broken.
In Jira Service Management Cloud Assets, the `/v1/object/aql` endpoint does not guarantee that `hasMoreResults` will remain `true` beyond the first page if the query is capped by the current API limits. Atlassian recently adjusted pagination behavior so that large result sets now require explicit paging using the `startAt` parameter rather than relying solely on the `hasMoreResults` flag. The `total` value in the payload reflects the number of objects returned in the current page, not the total matching the query, which is why you are seeing `total: 1000` despite having 35k records.
This is a major bug and a huge mistake in this implementation.
Why wasn't this done in a v2? The whole point of having versions in an API is to break already created implementations that utilize the API.
From my perspective, this is completely broken.
My example:
There are 1.3k total objects.
First search of maxResults=999 (to avoid any possible errors like: JSDCLOUD-16556)
"maxResults": 999,
"startAt": 0,
"total": 999,
"isLast": false,
"hasMoreResults": false,
"last": false
- sure, with the new broken implementation, now hasMoreResults is incorrect.
But your "total" variable is also incorrect when searching with an additional request.
Second search: startAt=999&maxResults=999:
"maxResults": 999,
"startAt": 999,
"total": 1000,
"isLast": true,
"hasMoreResults": true,
"last": true
- the total: 1000 is COMPLETELY wrong. There are ~300 returned objects.
Sure, isLast and last are true, but the whole logic with total and hasMoreResults is broken.
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.