title: Rally: Java Rest Api: Limit on results returned?
body: <p>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?</p>
  
  <p>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?</p>
  
  <p>Here is my code:</p>
  
  <pre><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", "&gt;", timestamp));
      QueryResponse projectDefects = rallyApi.query(defectRequest);
  </code></pre>