AnsweredAssumed Answered

Vulnerability Scan Result via API

Question asked by swayam rath on Jul 2, 2015
Latest reply on Jul 2, 2015 by Robert Dell'Immagine

Hello All,

 

I have created a report template for host based scan. I have tagged the asset groups as well.

I am able to run a report using that "report template".

My requirement is to get the report data (in XML) using API call. For this I am using Report API's Launch Report functionality.

the code is like this -

var request = new RestRequest("api/2.0/fo/report/", Method.POST);

            request.AddHeader("X-Requested-With", "RestSharp");

            request.AddParameter("action", "launch");

            request.AddParameter("template_id", "1856270");

            request.AddParameter("output_format", "xml");

            IRestResponse response = client.Execute(request);

            var xml_text = response.Content;

 

the XML that I am getting is

 

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/simple_return.dtd">

<SIMPLE_RETURN>

  <RESPONSE>

    <DATETIME>2015-07-02T17:31:32Z</DATETIME>

    <TEXT>New report launched</TEXT>

    <ITEM_LIST>

      <ITEM>

        <KEY>ID</KEY>

        <VALUE>9696790</VALUE>

      </ITEM>

    </ITEM_LIST>

  </RESPONSE>

</SIMPLE_RETURN>

 

 

I am expecting the data contained in the report. How can I get it? Do I need to use something else?

 

Please suggest.

 

thanks,

swayan

Outcomes