AnsweredAssumed Answered

Update Host Asset API Call

Question asked by derekv on Aug 7, 2019
Latest reply on Aug 8, 2019 by derekv

Anyone have any luck updating multiple hosts with one xml?


Background: Trying to write a script to rename hosts where the name doesn't match the hostname or netbios name since Qualys hasn't provide a better option than to rename them all yourself.


Trying to play with the "Update Host Asset" call in  (page 64). The text implies you should be able to update multiple assets at once using one single xml (see bottom of page 65, "Sample - Update some fields for host assets that have names containing the word OLD").


So here is an example file.xml that I am sending in my post:


However, when I make the api call, it seems to only update the first entry...


Anyone played around with this or seem a simple error I am making? Would like to not have to write a script that continuously modifies a single xml and issues an api call for one entry at a time... Would perfer to just script the "file.xml" file as one single file and then have a single api call that updates all the names...