'next' key in API response does not respect reverse sorting by updated_on

Issue #16535 new
Johan Jansen
created an issue

When I use the following url:

https://api.bitbucket.org/2.0/repositories?role=member&sort=updated_on

and then check the 'next' key in the response, i see an url like this:

https://api.bitbucket.org/2.0/repositories?sort=updated_on&after=2016-08-30T12%3A59%3A02.440738%2B00%3A00&role=member

This is fine, it will loop me back to the beginning of times

However, if i use the url:

https://api.bitbucket.org/2.0/repositories?role=member&sort=-updated_on

and then check the next field I would expect the response to contain a search for 'before' to be able to loop to beginning of times. Instead, the next field contains this url:

https://api.bitbucket.org/2.0/repositories?sort=-updated_on&after=2017-11-10T13%3A40%3A17.624877%2B00%3A00&role=member

This way i can only request one page, unless i build the next url myself.

Comments (0)

  1. Log in to comment