Uninstalling Agents
Consider a scenario where you have deployed Qualys Cloud Agents on your GCP VM instances, and you want to uninstall agents that have not checked in for the last N days; you can use the API call.
Sample for uninstalling AgentSample for uninstalling Agent
Sample API Request
curl -u "USERNAME:PASSWORD" -X "POST" -H "Content-Type: text/xml" -H"Cache-Control: no-cache" --data-binary@uninstall_agents_not_checkedin.xml"https://qualysapi.qualys.com/qps/rest/2.0/uninstall/am/asset/"
Contents of uninstall_agents_not_checkedin.xml
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<filters>
<Criteria field="tagName" operator="EQUALS">Cloud Agent</Criteria>
<Criteria field="updated" operator="LESSER">2016-08-
25T00:00:01Z</Criteria>
</filters>
</ServiceRequest>
Refer to the Qualys Cloud Agent API User Guide for more information on Cloud Agent APIs.