TeamCity Web Services
Hello, does TeamCity have web services calls that can be used from other product?
We created a TeamCity Plugin to provision an agent machine automatically, but after the machine is created and registered into team city server, we want to wait for other product/process to send the approval to authorize the agent machine. Is there a web services call that other product/process can use to authorize an agent machine? If not, is there a way to implement a web service call inside a TeamCity plugin? Thanks.
Please sign in to leave a comment.
Hello,
You can authorize an agent via REST API: http://confluence.jetbrains.net/display/TW/REST+API+Plugin#RESTAPIPlugin-Agents
Use a request like:
curl -v --basic --user USERNAME:PASSWORD --request PUT "http://teamcity/httpAuth/app/rest/agents/id:3/authorized" --data true --header "Content-Type: text/plain"
Also, a TeamCity Java plugin can be written which will accept arbitrary requests and use open Java API to perform the required action. See http://confluence.jetbrains.net/display/TCD7/Developing+TeamCity+Plugins for an entry point on pluigins.