Hello,
I am trying to use the Qualys API (enterprise, student account) to search for assets similarly to how you would search them in the UI (using filters, boolean expressions, etc).
Here is the cURL command I am using for the API call:
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "https://qualysguard.qg3.apps.qualys.com/qps/rest/2.0/search/am/hostasset/" < ~/Downloads/params.xml
Here are the contents of params.xml, used in the call:
<ServiceRequest>
<filters>
<Criteria field="os" operator="EQUALS">Windows</Criteria>
</filters>
</ServiceRequest>
I get a "404 - Page Not Found" when I run the previously detailed command. I am not sure what is going wrong since I have no trouble with other calls such as report downloading and authentication record manipulations.
So, is something wrong with this endpoint? Has it changed? Or, am I making a mistake?
Thank you very much!
Now I see your mistake, your URL is wrong.
Change it to the one in the documentation