Launch On Demand Scan for Single Asset
Launches on-demand scan on a single asset where Cloud Agent is installed, where “id” is the asset ID on which the agent launches the on-demand scan.
The on-demand scan helps you with the flexibility to initiate a scan without waiting for the next scheduled scan.
Input ParametersInput Parameters
Use these parameters to launch an on-demand scan.
Parameter |
Mandatory /Optional |
Data Type |
Description |
---|---|---|---|
scan |
Mandatory |
value |
Type of on-demand scan to be launched. Valid values are: Inventory_Scan, Vulnerability_Scan, PolicyCompliance_Scan, UDC_Scan, SCA_Scan, SWCA_scan Note: You can only launch one type of scan at one time. |
overrideConfigCpu |
Optional |
boolean |
Set this flag to define the CPU throttle limits that the on demand scan will use. - Set to true to override the CPU throttle limits set in the configuration profile. - Set to false to use the CPU throttle limit values set in the configuration profile. If you do not provide any value in the API request URL, the default value— false is considered. Note: By default, Cloud Agent for Windows uses a throttle value of 100, and Cloud Agent for Linux uses a value of 0 (no throttling). |
Sample - Launch on demand scan on a single assetSample - Launch on demand scan on a single asset
API request
curl -X POST -H "Content-Type: text/xml" -H "Authorization: Basic AbcdAbcdAbcdAbcdAbcdAbcdAb" -H "Cache-Control: no-cache" --data @SingleAgent_ODS.xml "<qualys_base_url>/qps/rest/1.0/ods/ca/agentasset/19105105?scan=Inventory_Scan&OverrideConfigCpu=false"
Contents of SingleAgent_ODS.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/1.0/ca/agentasset.xsd"> >
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<SingleModuleResponse>
<module>Inventory Scan</module>
<count>1</count>
<assetIds>[19010134]</assetIds>
<responseCode>SUCCESS</responseCode>
</SingleModuleResponse>
</data>
</ServiceResponse>
XSD
<platform API server>/qps/xsd/1.0/ca/agentasset.xsd