How to disconnect an agent via REST API
search cancel

How to disconnect an agent via REST API


Article ID: 206678


Updated On:


CA Automic Workload Automation - Automation Engine


This article covers how to disconnect an agent via REST API that can then be called from a different script; for example, powershell

Requirements: "Disconnect Agent Connection" on every agent, but from a script

It's possible to retrieve the agents' information trough the rest API, but there is no POST method for http://aeserverr:8088/ae/api/v1/0/system/agents


Release : 12.3



There is a script function that in general can be used to disconnect an agent. It would look like this:


where AGENT_NAME is replaced with the actual agent name that should be disconnected. More information can be found in the documentation here:

The REST API can be used to then run the script using the POST scripts method (please note this cannot be run from client 0 since client 0 does not run executable objects), http://aeserverr:8088/ae/api/v1/[CLIENT]/scripts

where [CLIENT] is replaced by a working client number. The body/json in this case would look like this:


More information on the scripts method can be found in the REST API documentation here:,../Continuous.Delivery.Automation/swagger.json,../Analytics/swagger.json,../Infrastructure.Manager/swagger.json#/scripts/activateScript