List reports

/api/2.0/fo/report/?action=list

[GET]  [POST]

List reports in the user's account. The report list output includes all report types, including scorecard reports.

Permissions - Managers and Auditors view all assets in the subscription, Unit Managers view assets in their own business unit, Scanners and Readers view assets in their own account.

Input Parameters

Parameter

Description

action=list

(Required)

echo_request={0|1}

(Optional) Specify 1 to view (echo) input parameters in the XML output. By default these are not included.

id={value}

(Optional)  Specifies a report ID of a report that is saved in the Report Share storage space. When specified, information on the selected report will be included in the XML output.

state={value}

(Optional) Specifies that reports with a certain state will be included in the XML output. By default, all states are included. A valid value is: Running (reports are in progress), Finished, Submitted, Canceled, or Errors.

user_login={value}

(Optional) Specifies a user login ID. This parameter is used to restrict the XML output to reports launched by the specified user login ID.

expires_before_datetime={date}

(Optional) Specifies the date and time (optional) when reports will expire in the future. Only reports that expire before this date/time will be included in the XML output.

The date/time is specified in YYYY-MM-DD[THH:MM:SSZ] format (UTC/GMT), like "2007-07-01" or "2007-01-25T23:12:00Z".

client_id= {value}

(Optional) Id assigned to the client (Consultant subscription only). Parameter client_id or client_name may be specified for the same request.

client_name= {value}

(Optional) Name of the client (Consultant subscription only). Parameter client_id or client_name may be specified for the same request.

 

Sample - List reports

API request

curl -H "X-Requested-With: Curl Sample"

-b "QualysSession=71e6cda2a35d2cd404cddaf305ea0208; path=/api; secure" "https://qualysapi.qualys.com/api/2.0/fo/report/?action=list"

XML output

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

<!DOCTYPE REPORT_LIST_OUTPUT SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/report/report_list_output.dtd">

<REPORT_LIST_OUTPUT>

  <RESPONSE>

    <DATETIME>2017-10-30T22:32:15Z</DATETIME>

    <REPORT_LIST>

      <REPORT>

        <ID>42703</ID>

        <TITLE><![CDATA[Test now]]></TITLE>

        <TYPE>Scan</TYPE>

        <USER_LOGIN>acme_aa</USER_LOGIN>

        <LAUNCH_DATETIME>2017-10-30T17:59:22Z</LAUNCH_DATETIME>

        <OUTPUT_FORMAT>PDF</OUTPUT_FORMAT>

        <SIZE>129.1 MB</SIZE>

        <STATUS>

          <STATE>Finished</STATE>

        </STATUS>

        <EXPIRATION_DATETIME>2017-11-06T17:59:24Z</EXPIRATION_DATETIME>

      </REPORT>

      <REPORT>

        <ID>42700</ID>

        <TYPE>Scorecard</TYPE>

        <USER_LOGIN>acme_ts2</USER_LOGIN>

        <LAUNCH_DATETIME>2017-10-29T22:12:42Z</LAUNCH_DATETIME>

        <OUTPUT_FORMAT>SECURE_PDF</OUTPUT_FORMAT>

        <SIZE>18.1 KB</SIZE>

        <STATUS>

          <STATE>Finished</STATE>

        </STATUS>

        <EXPIRATION_DATETIME>2017-11-05T22:12:44Z</EXPIRATION_DATETIME>

      </REPORT>

      <REPORT>

        <ID>42699</ID>

        <TYPE>Scorecard</TYPE>

        <USER_LOGIN>quays_ts2</USER_LOGIN>

        <LAUNCH_DATETIME>2017-10-29T21:52:19Z</LAUNCH_DATETIME>

        <OUTPUT_FORMAT>PDF</OUTPUT_FORMAT>

        <SIZE>19.87 KB</SIZE>

        <STATUS>

          <STATE>Finished</STATE>

        </STATUS>

        <EXPIRATION_DATETIME>2017-11-05T21:52:21Z</EXPIRATION_DATETIME>

      </REPORT>

    </REPORT_LIST>

  </RESPONSE>

</REPORT_LIST_OUTPUT>

DTD

<platform API server>/api/2.0/fo/report/report_list_output.dtd