How to assign an agent to a build using TeamCity API


Which API should I use to assign an agent to a build in build queue before the build start?  Here's what I want to do:  after a build is added to the build queue, in function buildTypeAddedToQueue(SQueuedBuild queuedBuild), I'm calling a function to provision an agent machine.  I want to be able to hold the build in the queue or pause it before the build start until the agent machine is provisioned and registered and authorized by the TeamCity server, and then I need to assign this new agent to the build and start the build process.  Which API should I use to hold the build and which API can I use to assign an agent to the build?  Thanks a lot!

1 comment
Comment actions Permalink

I believe that this API could be smoothly applied for your task:

Do not hesitate to contact, if there stayed any questions.


Please sign in to leave a comment.