Report Template Count

[POST] /qps/rest/3.0/count/was/reporttemplate

Returns the total number of report templates in the user’s scope.

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

Input ParametersInput Parameters

These elements are optional and act as filters. When multiple elements are specified, parameters are combined using a logical AND. See Reference: Report Creation for details.

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.

type

Optional

keyword The report type, one of:  WAS_SCAN_REPORT, WAS_WEBAPP_REPORT, WAS_SCORECARD_REPORT, 
WAS_CATALOG_REPORT

Sample - Count the report templatesSample - Count the report templates

You can search for templates by using different filters for template ID, template name or type of report. Let’s consider an example of searching report template using filter for template ID.

API request

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

Request POST data

<ServiceRequest>
    <filters>
        <Criteria field="id" operator="EQUALS">1234</Criteria>
    </filters>
</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/reporttemplate.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>6</count>
</ServiceResponse>      
    

XSD

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