如何使用Rest API Java工具包获取与项目ID相关的里程碑列表?
答案 0 :(得分:1)
由于您似乎知道项目ID,因此请查询项目对象包含该ID的里程碑:
RallyRestApi restApi = new RallyRestApi(new URI("https://rally1.rallydev.com"), "_ApIk3y");
QueryRequest request = new QueryRequest("Milestone");
request.setQueryFilter(new QueryFilter("Projects", "contains", "/project/<YOUR PROJECT ID>"));
QueryResponse response = restApi.query(request);
if (response.wasSuccessful() && response.getResults().size() > 0) {
System.out.println(response.getResults().get(0).getAsJsonObject());
}