Delete Report

[POST] /qps/rest/3.0/delete/was/report/<id>

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

Delete a report which is in the user’s scope. Want to find a report ID to use as input? See Search reports.

Permissions required - User must have WAS module enabled. User account must have these permissions: Access Permission “API Access” and "Delete Report” permission. The output includes reports in the user's scope.

Input ParametersInput Parameters

These elements are optional and act as filters. When multiple elements are specified, parameters are combined using a logical AND. To delete one report by the report ID, the id element is required. the other elements listed below are used to delete reports based on filters. See Reference: Report for descriptions of these <Report> elements.

Click here for available operators

Parameter

Mandatory

/Optional

Data Type

Description

id

Optional

integer

The report ID. This element is assigned by the service and is required for a certain type of request (details, status, update, delete, send or download).

name

Optional

text

A report name (maximum 256 characters). Applies to all reports.

tags.id

Optional

integer

 ID of the tag associated with the report.

tags.name

Optional

text

Name of the tag associated with the report.

creationDate

Optional

date

The date when the report was created in UTC date/time format (YYYY-MM-DDTHH:MM:SSZ).

type

Optional

keyword

The report type, one of: WAS_SCAN_REPORT, WAS_WEBAPP_REPORT, WAS_SCORECARD_REPORT, WAS_CATALOG_REPORT, DATALIST_REPORT.

format

Optional

keyword

The format of the report, one of: HTML_ZIPPED, HTML_BASE64, PDF, PDF_ENCRYPTED, POWERPOINT, CSV, XML, WORD.

status

Optional

keyword

The status of the report: RUNNING, ERROR or COMPLETE.

Sample - Delete a single reportSample - Delete a single report

Let us delete report with the ID 6333.

API request

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"
"<qualys_base_url>/qps/rest/3.0/delete/was/report/6333"      
    

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>6333</id>
        </Report>
    </data>      
    

Sample - Delete reports - criteriaSample - Delete reports - criteria

Let us delete reports matching one or both of these criteria: 1) reports with names that contain the string “to be deleted”, and 2) reports that are completed (having the status COMPLETED).

API request

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

Request POST data

<ServiceRequest>
    <filters>
        <Criteria field="name" operator="CONTAINS">to be deleted</Criteria>
        <Criteria field="status" operator="EQUALS">COMPLETE</Criteria>
    </filters>
</ServiceRequest>      
    

XML response

<ServiceRequest>
    <filters>
        <Criteria field="name" operator="CONTAINS">to be deleted</Criteria>
        <Criteria field="status" operator="EQUALS">COMPLETE</Criteria>
    </filters>
</ServiceRequest>      
    

XSD

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