Returns the number of assets that match the provided criteria. A host asset is counted when the asset is visible to the user (i.e. in the user’s scope).
Permissions required - Managers with full scope. Other users must have these permissions: Access Permission “API Access” and Asset Management Permission “Read Asset”
Click here for available operators
|
Parameter |
Mandatory /Optional |
Data Type |
Description |
|---|---|---|---|
|
id |
Optional |
integer |
|
|
name |
Optional |
text |
|
|
created |
Optional |
date |
|
|
updated |
Optional |
date |
|
|
type |
Optional |
keyword |
UNKOWN, HOST, SCANNER, WEBAPP, MALWARE_DOMAIN |
|
tagName |
Optional |
text |
Parent tags of the tag will also match |
|
tagId |
Optional |
text |
Parent tags of the tag will also match |
API request
curl -u “USERNAME:PASSWORD” "<qualys_base_url>/qps/rest/2.0/count/am/asset" < file.xml
Note: “file.xml” contains the request POST data.
Request POST data
<ServiceRequest>
<filters>
<Criteria field="tagName" operator="EQUALS">To Delete</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>1</count>
</ServiceResponse>
<platform API server>/qps/xsd/2.0/am/asset.xsd