We're trying to use the Rally REST API v2.0 to extract data from Rally and bring it into a local database for further internal analysis. Initially, I make this call to get back the JSON with all the projects I want to enumerate through:
https://rally1.rallydev.com/slm/webservice/v2.0/workspace/17200849689
and in the JSON I get back
...
"Projects":{
"_rallyAPIMajor":"2",
"_rallyAPIMinor":"0",
"_ref":"https://rally1.rallydev.com/slm/webservice/v2.0/Workspace/17200849689/Projects",
"_type":"Project",
"Count":36
},
...
So my assumption is there should be 36 projects for me to go through, which I can access via the reference included above.
However, I then subsequently make a call using the URL above and appending an orderby clause, start index and pagesize based on the content. In effect .../17200849689/Projects?orderby=CreationDate&start=1&pagesize=20
Problem is, I don't get back 20 of the records. I get 16. It sort of seems like start should be zero based (which seems like it'd explain why I get back 16 records with a pagesize of 20), but if I call the above with start=0 (which isn't what the API reference indicates anyway), I still only get back 16 records.
In addition, the resulting JSON from the call disagrees with the record count. I get this back. Which indicates 56 records, not 36. I've gone and hand counted the number of projects via the website and arrived at 36 as well.
{
"QueryResult":{
"_rallyAPIMajor":"2",
"_rallyAPIMinor":"0",
"Errors":[
],
"Warnings":[
],
"TotalResultCount":56,
"StartIndex":1,
"PageSize":20,
...
Am I misunderstanding how start and pagesize work in my example call? Thanks in advance for any input/suggestions!