AnsweredAssumed Answered

Create Scan report through API

Question asked by Maximiliano Lagos on Apr 11, 2019
Latest reply on Apr 15, 2019 by DMFezzaReed

I was trying to download a PDF report, with the results of a scheduled scan which runs every day.


I realized, by reading the documentation, that I need to create the report first, and then download it.


The steps that am following, according to documentation, are:


  1. First, I get the last daily scan, by sending some filters and get the scan ID required on next step:
    1. $ curl -u "user:pass" -H "content-type: text/xml" -X "POST" --data-binary @- "" < file.xml

  2. Then
    1. $ curl -u "user:pass"text/xml" -X "POST" —-data-binary @- "" < params.xml
    2. ## This is params.xml content ##

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




            <name><![CDATA[Scan Report for Servers]]></name>




















And, I am getting a weird error at that point (step 2). First, it says that --data-binary could not be resolved as host, so it seems like curl does not recognize the tag. Here is the complete log:

$ curl -u "user:pass" -H "content-type:text/xml" -X "POST" —-data-binary @- "" < params.xml

curl: (6) Could not resolve host: —-data-binary

curl: (6) Could not resolve host: -

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

<ServiceResponse xmlns:xsi="" xsi:noNamespaceSchemaLocation="">



    <errorMessage>name: Element is required.</errorMessage>




The error about the element required is, in my opinion, caused by the first block.