AnsweredAssumed Answered

API to Uninstall agents not checked-in in last N days

Question asked by Max Max on Mar 21, 2018
Latest reply on Mar 26, 2018 by Busby

I found this in the API guide for cloud agents

 

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/"

 

This needs a xml file that puts a date, instead of N days.

 

<?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>

...

...

Is there a way to set up N days like "today - 30 days" instead of a date?

 

Thanks

Outcomes