AnsweredAssumed Answered

API: Edit asset group to remove bulk IPs

Question asked by Ricardo Gomez on Apr 1, 2020

I am trying to remove a large number of IP addresses from several asset groups so I would like to use an xml file to feed the list of IP addresses.

I have used the command curl -u "username:password" -H "X-Requested-With: Curl" -X "POST" -d "id=91495299&remove_ips=ip1,ip2,ip3,etc" "https://qualysapi.qualys.eu/api/2.0/fo/asset/group/?action=edit"

But I would like to use something like: curl -u "username:password" -H "content-type: text/xml" -X "POST" --data-binary @file1.xml "https://qualysapi.qualys.eu/api/2.0/fo/asset/group/?action=edit"

Can anyone please help me with the command and XML file syntax?

 

Thanks,

Ricardo.

Outcomes