Catalog Report

[POST] /qps/rest/3.0/create/was/report

Using the Report Creation API you can create the Catalog Report. A Catalog Report shows you the number and status of entries in your web application catalog.

Permissions required - User must have WAS module enabled. User account must have these permissions: Access Permission “API Access” and “Create Report”.

Input ParametersInput Parameters

These elements are optional and act as filters. When multiple elements are specified, parameters are combined using a logical AND. The element “target” is required and at least one “scans” child element is required. For details, refer to Reference: Report Creation.

Click here for available operators

Parameter

Mandatory

/Optional

Data Type

Description

filters.scanDate

Optional

DatetimeRange

Filter by scan date.

filters.url

Optional

text

Filter by web app URL.

filters.ip

Optional

text

Filter by IP address.

filters.os

Optional

text

Filter by OS.

filters.status

Optional

EntryStatus

Filter by status.

format

Optional

keyword

Report format, one of: WORD, HTML_ZIPPED, HTML_BASE64, PDF, PDF_ENCRYPTED, CSV, CSV_V2, XML, POWERPOINT

display.contents

Optional

CatalogReportContent

The report content: Description, Summary, Results, Individual Records, Graphs.

display.graphs

Optional

CatalogReportGraph

The graphs to be included in the report: ENTRIES_BY_STATUS, ENTRIES_ADDED_OVER_TIME, OPERATING_SYSTEMS_DETECTED. 

display.groups

Optional

CatalogReportGroup

The group category to be included in the report: STATUS, OPERATING_SYSTEM.

Sample - Create a catalog reportSample - Create a catalog report

Let us create a catalog report in CSV format, selecting a single tag for the target.

API request

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/3.0/
was/report.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <Report>
            <id>973058</id>
        </Report>
    </data>
</ServiceResponse>     
    

Request POST data

<ServiceRequest>
    <data>
    <Report>
        <name>
        <![CDATA[with all parameters CSV]]>
        </name>
        <description>
        <![CDATA[A simple Catalog report]]>
        </description>
        <type>WAS_CATALOG_REPORT</type>
        <format>CSV</format>
        <config>
        <catalogReport>
            <display>
            <contents>
                <CatalogReportContent>DESCRIPTION</CatalogReportContent>
                <CatalogReportContent>SUMMARY</CatalogReportContent>
                <CatalogReportContent>GRAPHS</CatalogReportContent>
                <CatalogReportContent>RESULTS</CatalogReportContent>
                <CatalogReportContent>INDIVIDUAL_RECORDS</CatalogReportContent>
            </contents>
            <graphs>
                <CatalogReportGraph>ENTRIES_ADDED_OVER_TIME</CatalogReportGraph>
                <CatalogReportGraph>ENTRIES_BY_STATUS</CatalogReportGraph>
            </graphs>
            <groups>
                <CatalogReportGroup>STATUS</CatalogReportGroup>
                <CatalogReportGroup>OPERATING_SYSTEM</CatalogReportGroup>
            </groups>
            </display>
            <filters>
            <status>
                <EntryStatus>NEW</EntryStatus>
                <EntryStatus>SUBSCRIPTION</EntryStatus>
                <EntryStatus>ROGUE</EntryStatus>
                <EntryStatus>APPROVED</EntryStatus>
                <EntryStatus>REJECTED</EntryStatus>
            </status>
            <scanDate>
                <startDate>2017-06-29</startDate>
                <endDate>2017-06-29</endDate>
            </scanDate>
            <url>
                <![CDATA[mysite.fr]]>
            </url>
            <os>
                <![CDATA[unix]]>
            </os>
            </filters>
        </catalogReport>
        </config>
    </Report>
    </data>
</ServiceRequest>      
    

XML response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/3.0/was/report.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <Report>
            <id>5629</id>
        </Report>
    </data>
</ServiceResponse>    
    

Sample - Create a catalog report using report templateSample - Create a catalog report using report template

Let’s generate a catalog report in PDF format using a specific template (identified by its template ID).

API request

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @-
"<qualys_base_url>/qps/rest/3.0/create/was/report" < file.xml
Note: “file.xml” contains the request POST data.      
    

Request POST data

<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
    <data>
        <Report>
            <name>
                <![CDATA[Catalog Report for Servers]]>
            </name>
            <description>
                <![CDATA[A simple catalog report]]>
            </description>
            <format>PDF</format>
            <template>
                <id>876050</id>
            </template>
        </Report>
    </data>
</ServiceRequest>      
    

XML response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/
xsd/3.0/was/report.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <Report>
            <id>973058</id>
        </Report>
    </data>
</ServiceResponse>      
    

XSD

<platform API server>/qps/xsd/3.0/was/report.xsd