I don't know how to specify a query filter that will limit by Iteration. Using the following code, I'm trying to get only the user stories within an iteration for a project...
QueryRequest query = new QueryRequest("HierarchicalRequirement");
query.setFetch(new Fetch("Name", "FormattedID", "Description", "Iteration", "PortfolioItem"));
query.setPageSize(pageSize);
query.setLimit(20);
query.setScopedDown(false);
query.setScopedUp(false);
query.setProject(parms.getProjectURL());
query.setQueryFilter(new QueryFilter("Iteration._refObjectName", "=", parms.getIteration()));
QueryResponse featureSet = restApi.query(query);
Response is unsuccessful, with the result:
Could not parse: Attribute "_refObjectName" on type Iteration is not allowed in query expressions.