3

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?

Arpit
  • 6,212
  • 8
  • 38
  • 69
user1397558
  • 63
  • 1
  • 9

1 Answers1

3

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

Arpit
  • 6,212
  • 8
  • 38
  • 69
  • Thanks a lot! I think this API can get status of the build which is already finished, but can not know one build is whether running or in queue. – user1397558 Nov 27 '12 at 06:37
  • I'm using a build locator with the `builds` action with `?locator=running:any` on the end of the URL to also get running builds, so I suspect this one works the same and you'll be able to use a build locator with `running:any`. – Jonathon Rossi Nov 27 '12 at 11:17
  • 1
    thanks! you are right, this one can get the finished and running build, but the builds in queue still can't get. – user1397558 Feb 26 '14 at 09:22