Q:

Visual Studio REST API Changesets Limit

I'm using the Visual Studio Online REST API to fetch changeset data from my server.  A problem that I'm encountering is that there seems to be a limit to changeset data returned.  This limit seems to be capping at 255.
To retrieve my changesets, I use the following url:

https://< account >.visualstudio.com/defaultcollection/_apis/tfvc/changesets?$top=255&api-version=1.0-preview

This will yield an expected 255 results (due to setting the $top=255 parameter); however, if I supply anything over 255, ...$top=256 for example, the server seems to break down and return an arbitrary number - in my case, 91 total records.
I know that I have over 1,000 changeset records, though it seems I can only reliably return a maximum of 255 records.
Has anyone encountered this, and if so, how did you work around this cap?
I have tried using a date range and it still yields the same results. Example:

https://< account >.visualstudio.com/defaultcollection/_apis/tfvc/changesets?$top=256&searchCriteria.fromDate=2000-01-01&searchCriteria.toDate=2015-01-01&api-version=1.0-preview

The above only returns 91 records, and yet I would expect to see 256.

A:

According to the API documentation, you will need to include $skip to page through the results.
The first 255
https://{account}.visualstudio.com/defaultcollection/_apis/tfvc/changesets?$top=255&api-version={version}

The next 255
https://{account}.visualstudio.com/defaultcollection/_apis/tfvc/changesets?$skip=255&$top=255&api-version={version}

... and so on.

