Change the order of Changesets via REST API to be newest to oldest (BB-2082)

Issue #2854 closed
Kevin Formsma
created an issue

I'm using the Changeset REST API ( The pages are sorted descending but the results within a page are sorted ascending. So the first page of changesets are the most recent, but the first changset within the json result, isn't the most recent. I would have expected the changesets within a page to be sorted descending as well.

Let me know if you need more info.

Comments (6)

  1. Dylan Etkin

    The reason they are in the page as newest to oldest is that is usually what people want to see.

    I believe the REST API is just trying to give you access to all the changesets.

    Are you suggesting that we change the API to return changeset newest to oldest?

    Cheers, Dylan

  2. Kevin Formsma reporter

    Yea, I think the API should return changesets from newest to oldest. As you said, that makes the most sense.

    I think maybe I wasn't super clear on what I was talking about originally. When you make a request for the changesets in a repo, the results are limited to X amount per request. In the first request for this resource, you will get the most recent X changesets. That is great! However those X most recent changesets, are ordered oldest to newest. I would have expected these changesets to be newest to oldest as well.

    For example, a call to '' returns an array of changesets starting with revision 12047, rather than the most revision 12061. Its not a big deal, but it means I have to sort these results by revision descending myself after processing the API response if I want users to see the most recent changes.

  3. Log in to comment