Deactivate a Single Agent
Deactivate a single cloud agent for one or more modules (i.e. VM, PC, FIM, EDR, SCA, CAPS, SwCA, MTG). We have added support for new Qualys application — Mitigation.
Where:
“id” (Required) is the asset ID of the agent you want to deactivate. This is the agent ID where the agent is installed.
“module” (Required) is the module to be deactivated: AGENT_VM (for VM module), AGENT_PC (for PC module), AGENT_FIM (for FIM module), AGENT_EDR (for EDR module) or AGENT_SCA (for SCA module), AGENT_CAPS (for Cloud Agent as Passive Sensor module), AGENT_SwCA (for Software Composition Analysis module), AGENT_MTG (for Mitigation module). The specified module must be enabled in the user’s subscription. You can specify more than one module separated by a comma. For example, module=AGENT_VM, AGENT_PC, AGENT_FIM, AGENT_EDR, AGENT_SCA, AGENT_CAPS, AGENT_SwCA, AGENT_MTG.
Permissions required - Managers with full scope. Other users must have these permissions: Access Permission “API Access” and CA Agent Permission “Deactivate Agent”.
Input ParametersInput Parameters
There are no input parameters.
Sample - Deactivate single agent for VM moduleSample - Deactivate single agent for VM module
API request
curl -u fo_username:password -X POST -H "Content-Type: text/xml" --data-binary @single_deactivation.xml
"<qualys_base_url>/qps/rest/2.0/deactivate/am/asset/5214017?module=AGENT_VM"
Note: “file.xml” contains the request POST data.
Contents of single_deactivation.xml
<?xml version="1.0" encoding="UTF-8" ?> <ServiceRequest> </ServiceRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/2.0/am/asset.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<Asset>
<id>5214017</id>
<name>113080-T450</name>
<created>2017-04-12T07:23:41Z</created>
<modified>2017-04-19T07:07:12Z</modified>
<type>HOST</type>
<tags>
<list>
<TagSimple>
<id>7584632</id>
<name>Cloud Agent</name>
</TagSimple>
</list>
</tags>
<sourceInfo>
<list>
<AssetSource/>
</list>
</sourceInfo>
</Asset>
</data>
</ServiceResponse>undefined</ServiceResponse>
XSD
<platform API server>/qps/xsd/2.0/am/asset.xsd