Search Report
Returns a list of reports which are in the user’s scope.
Permissions required: User must have WAS module enabled. User account must have these permissions: Access Permission API Access. 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. 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, CSV_V2, XML, WORD. |
|
status |
Optional |
keyword |
The status of the report: RUNNING, ERROR or COMPLETE. |
Sample - Search reports (no criteria)Sample - Search reports (no criteria)
Let us view a list of all reports in the user’s scope.
API request:
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" "<qualys_base_url>/qps/rest/3.0/search/was/report"
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"
<ServiceResponse>
<count>3</count>
<data>
<list>
<Report>
<id>1393</id>
<name>
<![CDATA[Web Application Report 1]]>
</name>
<type>WAS_WEBAPP_REPORT</type>
<format>PDF</format>
<status>COMPLETE</status>
<size>2244667</size>
<creationDate>2017-11-25T10:20:06Z</creationDate>
<tags>
<count>0</count>
</tags>
<owner>
<id>123056</id>
<username>username</username>
<firstName>
<![CDATA[John]]>
</firstName>
<lastName>
<![CDATA[Smith]]>
</lastName>
</owner>
</Report>
<Report>
<id>1394</id>
<name>
<![CDATA[Web Application Report 2]]>
</name>
<type>WAS_WEBAPP_REPORT</type>
<format>PDF</format>
<status>COMPLETE</status>
<size>124578</size>
<creationDate>2017-11-25T10:21:25Z</creationDate>
<tags>
<count>0</count>
</tags>
<owner>
<id>123056</id>
<username>username</username>
<firstName>
<![CDATA[John]]>
</firstName>
<lastName>
<![CDATA[Smith]]>
</lastName>
</owner>
</Report>
<Report>
<id>1282</id>
<name>
<![CDATA[Web Application Report 3]]>
</name>
<type>WAS_WEBAPP_REPORT</type>
<format>PDF</format>
<status>COMPLETE</status>
<size>12341234</size>
<creationDate>2017-11-24T00:00:00Z</creationDate>
<tags>
<count>0</count>
</tags>
<owner>
<id>123056</id>
<username>username</username>
<firstName>
<![CDATA[John]]>
</firstName>
<lastName>
<![CDATA[Smith]]>
</lastName>
</owner>
</Report>
</list>
</data>
<isDone>true</isDone>
<responseCode>SUCCESS</responseCode>
<responseErrorDetails>
<internalErrorCodeId>0</internalErrorCodeId>
</responseErrorDetails>
</ServiceResponse>
Sample - Search for a particular reportSample - Search for a particular report
API request:
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/3.0/search/was/report" < file.xml
Note: “file.xml” contains the request POST data.
Request POST data:
<ServiceRequest>
<filters>
<Criteria field="tags.id" operator="EQUALS">99511</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/report.xsd"
<ServiceResponse>
<count>1</count>
<data>
<list>
<Report>
<id>1302</id>
<name>
<![CDATA[Web Application Report 2]]>
</name>
<type>WAS_WEBAPP_REPORT</type>
<format>PDF_ENCRYPTED</format>
<status>COMPLETE</status>
<size>2244667</size>
<creationDate>2017-11-24T00:00:00Z</creationDate>
<tags>
<count>1</count>
</tags>
<distributionList>
<count>12</count>
</distributionList>
<owner>
<id>123056</id>
<username>username</username>
<firstName>
<![CDATA[John]]>
</firstName>
<lastName>
<![CDATA[Smith]]>
</lastName>
</owner>
</Report>
</list>
</data>
<isDone>true</isDone>
<responseCode>SUCCESS</responseCode>
<responseErrorDetails>
<internalErrorCodeId>0</internalErrorCodeId>
</responseErrorDetails>
</ServiceResponse>
XSD
<platform API server>/qps/xsd/3.0/was/report.xsd