AnsweredAssumed Answered

What is the right API to get scan results?

Question asked by ps dev on Jun 26, 2018
Latest reply on Jun 26, 2018 by Sam Friday

On GUI it's very easy: after the scan, on the scans tab i'm clicking on my scan title, preview will open below and when I click on 'View Results' new window will be open with the report (and then i can save it to file etc.)

the report is in new windows with url such as this : https://qualysguard.qg2.apps.qualys.eu/fo/report/report_view.php?default=1&format=30&id=213871

 

My question is how can i get this report with RESTful API?

I try to do what I'd understand from "Qualys API V2 - User Guide": when I ask for:  

curl -H "X-Requested-With: A" -d "action=fetch&id=213871" -b cookies "https://qualysapi.qg2.apps.qualys.eu/api/2.0/fo/report/"

 

I got this XML:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qg2.apps.qualys.eu/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2018-06-26T12:04:21Z</DATETIME>
<CODE>7001</CODE>
<TEXT>Report cannot be fetched.</TEXT>
</RESPONSE>
</SIMPLE_RETURN>

 

how can I get the full report in XML/Json/somthing else by GET/POST request?

Attachments

Outcomes