Pulling back user stories from the Rally web service v1.39 (using the .NET Rest API) – I thought that setting the pagesize value would actually limit the number of records in the results collection. However that seemed to have no effect at all. Setting the Limit value does affect the number of results.
Could someone please explain what the difference is and why pagesize doesn’t do what I was expecting.
public static QueryResult GetProjectUserStories(string projectReference, int start)
{
var restApi = GetApi();
var pageSize = (Convert.ToInt32(WebConfigurationManager.AppSettings["RallyPageSize"]));
var request = new Request("HierarchicalRequirement")
{
Fetch = new List<string>()
{
"Name",
"Description",
"FormattedID",
"TaskEstimateTotal"
},
Query = new Query("Project.Name", Query.Operator.Equals, projectReference),
PageSize = pageSize,
Limit = pageSize,
Start = start
};
var queryResult = restApi.Query(request);
return queryResult;
}
I thought maybe this might be being translated into a “FindAll” search – but then why have a page size attribute?
Page Size is the number of results that will be returned in each response. The WSAPI allows this to range from 1 to 200. When there are more than 200 results it must be split up into multiple pages of data. Limit is the total maximum number of results to return.
So if you set page size to 200 and limit to 500 and there are 450 results the toolkit will make the following requests for you:
For a total of 450 results.