2015-09-21 39 views
2

我發現存儲提供了一個REST API以從repository.I中創建的項目獲取詳細信息。請告訴我如何我可以通過REST調用獲取隱藏項目下的列表分支嗎?如何使用JAVA中的REST調用獲取atlassian-stash項目上的分支列表

樣品藏匿項目路徑

https://stash.test.local/projects/DEV/repos/central-project/browse 

在上述中央項目包含像多個分支,

  1. 特徵/測試
  2. 特徵/ TEST1

我想通過REST調用獲取分支機構列表。

回答

0

我終於找到了一種方法來做到這一點。對於REST調用,我在JAVA中使用了rest-assured

RestAssured.baseURI = "https://stash.test.local"; 
RestAssured.basePath = "/rest/api/1.0/projects/DEV/repos/central-project/branches"; 
RestAssured.authentication = RestAssured.preemptive().basic(
        username, password); 
Response response = RestAssured.get(); 
String branchJSON = response.asString(); 
相關問題