Is there a limit on the number/size of results returned? For example, I queried for all defects and got 185 back, when the real number is above 600. Is there a way I can detect if the query couldn’t get all the results?
Edit: It looks like I’m hitting the page limit size of 200. Does anyone know how to craft a loop to get the next set of results?
Here is my code:
String rallyProjectOid = getRallyProjectOid(rallyApi, rallyProjectName);
// Get the list of Rally defects for the project
QueryRequest defectRequest = new QueryRequest("defect");
defectRequest.setFetch(new Fetch("Project", "LastUpdateDate", "FormattedId", "SubmittedBy", "Owner"));
defectRequest.setProject(rallyProjectOid);
defectRequest.setQueryFilter(new QueryFilter("LastUpdateDate", ">", timestamp));
QueryResponse projectDefects = rallyApi.query(defectRequest);
There is a setLimit() method on QueryRequest that allows you set the maximum number of records to be returned from the request. If this value is not specified for the request object, the behavior will be to return only one page of data (200 records).
So if you do:
The RestApi should return a larger number of results, and page them for you automatically.