Activate Multiple Agents
Bulk activates cloud agents for one or more modules (i.e. VM, PC, FIM, EDR, SCA, CAPS, SwCA). We have added support for new Qualys application — Mitigation.
Where “module” (Required) is the module to be activated for the agent: 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.
- AGENT_PC and AGENT_SCA cannot be activated at the same time as SCA is a subset of PC.
- CAPS module is applicable only for Windows platform.
- CAPS configuration must be created before activating CAPS module.
- SwCA is supported only for Windows and Linux platforms and can be activated only when VM is activated for the agent.
- Filter criteria required - For a bulk request it is mandatory to add this filter criteria in <ServiceRequest>: <Criteria field="tagName" operator="EQUALS">Cloud Agent</Criteria>
Permissions required - Managers with full scope. Other users must have these permissions: Access Permission “API Access” and CA Agent Permission “Activate Agent”.
Input ParametersInput Parameters
To activate all agents installed, nothing other than the filter tagName EQUALS Cloud Agent is recommended. The more filters added to the request we’ll activate a more refined list of agents.
Use the following <ServiceRequest> parameters to select agents you want to activate. These parameters act as filters. When multiple filters are specified, parameters are combined using a logical AND.
Filter operators are available for use with <ServiceRequest> parameters.
Parameter |
Mandatory /Optional |
Data Type |
Description |
---|---|---|---|
id |
Optional |
integer |
Asset ID of the agent host. |
name |
Optional |
string |
Asset name of the agent host. |
created |
Optional |
date |
Date when the agent host was added to your asset inventory (i.e. when the agent was provisioned). Date is specified in UTC/GMT format, i.e. YYYY-MM-DD[THH:MM:SSZ] |
updated |
Optional |
date |
Date when the agent was last updated, such as activation, host name change, etc. Date is specified in UTC/GMT format. |
tagName |
Mandatory |
string |
Asset tag name assigned to the agent host. All agent hosts are assigned the tag Cloud Agent. |
Sample - Bulk activate agents for VM, FIM, and MTGSample - Bulk activate agents for VM, FIM, and MTG
API request
curl -u fo_username:password -X POST -H "Content-Type: text/xml" -H "Cache-Control: no-cache" --data-binary @activate_all_agents.xml
"<qualys_base_url>/qps/rest/2.0/activate/am/asset?module=AGENT_VM,AGENT_FIM, AGENT_MTG"
Note: “file.xml” contains the request POST data.
Contents of activate_all_agents.xml
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<filters>
<Criteria field="tagName" operator="EQUALS">Cloud Agent</Criteria>
</filters>
</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>3</count>
<data>
<Asset>
<id>712038</id>
<name>192.168.1.12</name>
<created>2014-06-18T16:54:50Z</created>
<modified>2014-06-18T16:54:51Z</modified>
<type>HOST</type>
<tags>
<list>
<TagSimple>
<id>509525</id>
<name>Cloud Agent</name>
</TagSimple>
</list>
</tags>
<sourceInfo>
<list>
<AssetSource/>
</list>
</sourceInfo>
</Asset>
<Asset>
<id>2532638</id>
<name>10.40.2.176</name>
<created>2015-04-17T13:32:48Z</created>
<modified>2015-05-14T14:06:03Z</modified>
<type>HOST</type>
<tags>
<list>
<TagSimple>
<id>509525</id>
<name>Cloud Agent</name>
</TagSimple>
</list>
</tags>
<sourceInfo>
<list>
<AssetSource/>
</list>
</sourceInfo>
</Asset>
<Asset>
<id>2532838</id>
<name>local IP agent</name>
<created>2017-04-19T13:52:08Z</created>
<modified>2018-02-05T12:26:48Z</modified>
<type>HOST</type>
<tags>
<list>
<TagSimple>
<id>509525</id>
<name>Cloud Agent</name>
</TagSimple>
<TagSimple>
<id>217325</id>
<name>Agent</name>
</TagSimple>
</list>
</tags>
<sourceInfo>
<list>
<AssetSource/>
</list>
</sourceInfo>
</Asset>
</data>
</ServiceResponse>
XSD
<platform API server>/qps/xsd/2.0/am/asset.xsd