I am using the following url:
Without the limit this query would return 15 values (and isLastPage equals true). With limit=4 I get four values and:
"size": 4,"limit": 4,"isLastPage": false,"start": 0
Notice that isLastPage is false, but no nextPageStart is provided. The documentation says, "If more than one page exists (i.e. the response contains "isLastPage": false
), the response object will also contain a nextPageStart
attribute", so why am I not getting a nextPageStart value?
BTW, I did some further experimenting: I get the nextPageStart value if I remove the 'since' parameter. That narrows down the problem, but I don't see any work around since I really do need to define a starting point and an ending point for the commits.
Hi,
This is a bug in the Stash REST API due to an alternate paging implementation being used which doesn't expose the nextPageStart attribute. You can still build the next page request programatically based off the other information given in the response.
I've raised a bug to track the progress of fixing this inconsistency:
https://jira.atlassian.com/browse/STASH-3253
Thanks for the explanation.
As for building the next page programatically, the doc says:
Identifiers of adjacent objects in a page may not be contiguous, so the start of the next page is not necessarily the start of the last page plus the last page's size. A client should always use nextPageStart
to avoid unexpected results from a paged API.
If that is true, I don't see how I can reliably build the the next page call?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This can be true for resources which provide filtering capabilities (such as filtering users by matching usernames). It is fine to do for the commits resource as a workaround for the bug raised
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.