AnsweredAssumed Answered

api update not working

Question asked by Eric Kopp on Nov 5, 2015
Latest reply on Jan 13, 2016 by Jeff Leggett

I am trying to use the api to update some hosts here are the steps I am using:

 

1) curl -k -n -u "USERNAME:PASSWORD" "https://qualysapi.qg2.apps.qualys.com/qps/rest/2.0/get/am/hostasset/12345" > 12345.xml

2) edit the name and dnsHostName fields

3) save the file

4) curl -k -n -u "USERNAME:PASSWORD" -H "Content-type: text/xml" -X "POST" --data-binary @- "https://qualysapi.qg2.apps.qualys.com/qps/rest/2.0/update/am/hostasset/12345" < 12345.xml

 

but when I go back into the asset or re pull the info via the api it does not show my updates.

Outcomes