Activate one or more assets to make them available in your account for scanning and reporting. You’ll want to activate newly created hosts to make them available in the Vulnerability Management (VM) module and/or the Policy Compliance (PC) module.
Permissions required - Users with full scope. Other users must have requested assets in their scope and Access Permission “API Access”.
Click here for available operators
|
Parameter |
Mandatory /Optional |
Data Type |
Description |
|---|---|---|---|
|
qwebHostId |
Optional |
integer |
|
|
lastVulnScan |
Optional |
date |
|
|
lastComplianceScan |
Optional |
date |
|
|
informationGatheredUpdated |
Optional |
date |
|
|
os |
Optional |
text |
|
|
dnsHostName |
Optional |
text |
|
|
address |
Optional |
text |
|
|
vulnsUpdated |
Optional |
date |
|
|
id |
Optional |
integer |
|
|
name |
Optional |
text |
|
|
created |
Optional |
date |
|
|
type |
text |
||
|
netbiosName |
string |
||
|
netbiosNetworkID |
text |
||
|
networkGuid |
text |
||
|
trackingMethod |
keyword |
NONE, IP, DNSNAME, NETBIOS, INSTANCE_ID, QAGENT | |
|
port |
integer |
||
|
installedSoftware |
text |
||
|
tagName |
text |
||
|
tagId |
integer |
||
|
update |
date |
API request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/2.0/activate/am/hostasset?module=QWEB_PC" < file.xml
Note: “file.xml” contains the request POST data.
Request POST data
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<filters>
<Criteria field="tagName" operator="EQUALS">Azure-static-tag</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/hostasset.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<HostAsset>
<id>15127499</id>
<name>Sample Host asset</name>
<created>2020-07-09T06:38:09Z</created>
<modified>2020-08-05T19:00:23Z</modified>
<type>HOST</type>
<tags>
<list>
<TagSimple>
<id>110494212</id>
<name>Azure-static-tag</name>
</TagSimple>
<TagSimple>
<id>111047644</id>
</TagSimple>
<TagSimple>
<id>111051812</id>
</TagSimple>
</list>
</tags>
<sourceInfo>
<list>
<AzureAssetSourceSimple>
<assetId>15127499</assetId>
<type>AZURE</type>
<firstDiscovered>2020-07-09T06:38:09Z</firstDiscovered>
<lastUpdated>2020-08-05T18:54:41Z</lastUpdated>
<name>Sample Host asset</name>
<location>westus2</location>
<vmSize>Standard_B1ms</vmSize>
<vmId>0cfb7bd7-0baa-46c5-b0ca-a7440b10bee6</vmId>
<offer>CentOS</offer>
<state>DEALLOCATED</state>
<publisher>OpenLogic</publisher>
<version>latest</version>
<osType>Linux</osType>
<subnet>default</subnet>
<subscriptionId>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</subscriptionId>
<resourceGroupName>sample_resourcegroup</resourceGroupName>
<macAddress>00-0D-3A-C4-8F-3F</macAddress>
<privateIpAddress>172.16.7.5</privateIpAddress>
</AzureAssetSourceSimple>
</list>
</sourceInfo>
<qwebHostId>3906594</qwebHostId>
<os>Linux</os>
<dnsHostName>TestNullPointer-MN</dnsHostName>
<address>172.16.7.5</address>
<trackingMethod>VIRTUAL_MACHINE_ID</trackingMethod>
<networkInterface>
<list>
<HostAssetInterface>
<hostname>TestNullPointer-MN</hostname>
<type>PRIVATE</type>
<address>172.16.7.5</address>
</HostAssetInterface>
</list>
</networkInterface>
</HostAsset>
</data>
</ServiceResponse>
<platform API server>/qps/xsd/2.0/am/hostasset.xsd