有谁知道如何使用 TeamCity REST API 来了解当前正在运行哪些构建以及它们的运行时间(已用时间与估计时间)?
最佳答案
该 URL 返回您所要求的内容,包括完成百分比。 http://teamcityserver/httpAuth/app/rest/builds?locator=running:true
<builds count="1">
<build id="10" number="8" running="true" percentageComplete="24" status="SUCCESS" buildTypeId="bt3" startDate="20110714T210916+1200" href="/httpAuth/app/rest/builds/id:10" webUrl="http://phillipn02:29000/viewLog.html?buildId=10&buildTypeId=bt3"/>
</builds>
来源:http://devnet.jetbrains.net/message/5291132#5291132 。 相关行上REST API documentation是“http://teamcity:8111/httpAuth/app/rest/builds/?locator= - 通过“构建定位器”获取构建”的那个。在“使用”部分。
这适用于 TeamCity 版本 6.5;我还没有在早期版本上尝试过,但我怀疑它可以回到版本 5。
关于rest - TeamCity - 如何通过 REST API 获取当前正在运行的版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4750963/