Doing a "disable teamcity agent" from an ant script (url call?)


I want to controle the agent status - put the agent in the "disabled" state - from within a program/script (ant)  (hence: NOT using the GUI).

Can I do this?  How do I do this?

This would help me a lot in managing my teamcity park and processing jobs in a correct manor.



Wim Heuts

1 comment
Comment actions Permalink


You can try to use the approach described in the doc. For virtually any operation that can done from UI. So if you point your browser to a capturing proxy (e.g. Fiddler under Windows) and perform the operation in the browser, you can see the request performed and can try to reproduce it from the script.

However, this will be undocumented feature use and it can break with future TeamCity releases.

BTW, can you please describe your original case that you need this for? What type of automatic agent management do yo need? What is the case to ensure "correct order" for the builds?


Please sign in to leave a comment.