使用Rest API Java工具包获取敏捷中央项目ID的里程碑列表

时间:2018-07-12 14:57:06

标签: java rally

如何使用Rest API Java工具包获取与项目ID相关的里程碑列表?

1 个答案:

答案 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());
}