Is there a way to remove multiple build agents in one shot
I had a rouge process that went off and created a whole bunch of agents that I dont want. Now in my unauthorized list of agents I need to remove alot of them. Do I have to go thru each one and click remove agent or is there a way to do this in bulk?
Please sign in to leave a comment.
I assume this has yet to be implemented…. we just had a rogue process create 22,700+ unauthorized agents and deleting them one at a time by had is just not reasonable to expect anyone to do.
Hi,
Please refer to the Agent API documentation - https://www.jetbrains.com/help/teamcity/rest/manage-agents.html#Delete+Build+Agent.
You can use the list API to retrieve the agents and the delete API to remove the agents using your custom scripts. The following is the demo code with PowerShell. How to get the access token, please refer to https://www.jetbrains.com/help/teamcity/rest/quick-start.html#Authentication