Rest – How to use TeamCity REST API to get the triggered build’s buildId

custom-buildrestteamcity

I have triggered one custom build by TeamCity REST API:

http://{buildServer}/httpAuth/action.html?add2Queue={buildTypeId}

But this http request hasn't any response message, so I can not know whether this build is running or in build queue.

Does any body know how to get that information by REST API?

Best Answer

Well, you can see the list of supported requests and names of parameters of REST API by using the following URL:

http://{buildServer}/httpAuth/app/rest/application.wadl

TeamCity 7.1 Onwards, you can check the status of the builds by using the following REST URL:

http://{buildServer}//app/rest/builds/buildType:(id:btXXX)/statusIcon

Read the complete REST documentation here