Delete an existing scan on a web application which is in the user’s scope. You can delete any scan in your account that is not running.
Permissions required - User must have WAS module enabled. User account must have these permissions: Access Permission “API Access” and "Delete WAS scan" permission. The scan to be deleted must be within the user’s scope.
These elements are optional and act as filters. When multiple elements are specified, parameters are combined using a logical AND. Click here for descriptions of <WebApp> elements
Click here for available operators
Parameter |
Mandatory /Optional |
Data Type |
Description |
---|---|---|---|
id |
Optional |
integer |
The scan ID. |
name |
Optional |
text |
The scan name. |
webApp.name |
Optional |
text |
The name of the web application being scanned. |
webApp.id |
Optional |
integer |
The ID of the web application being scanned. |
reference |
Optional |
text |
Scan Reference ID. |
launchedDate |
Optional |
date |
The date and time when the scan was launched in UTC date/time format (YYYY-MM-DDTHH:MM:SSZ). |
type |
Optional |
keyword |
The scan type: VULNERABILITY or DISCOVERY. |
mode |
Optional |
keyword |
The mode of the scan: ONDEMAND, SCHEDULED or API. |
status |
Optional |
keyword |
The status of the scan: SUBMITTED, RUNNING, FINISHED, ERROR, CANCELED, PROCESSING. |
authStatus |
Optional |
keyword |
Indicates the status of the authentication record: NONE, NOT_USED, SUCCESSFUL, FAILED or PARTIAL. |
resultsStatus |
Optional |
keyword |
The status of the scan: NOT_USED, TO_BE_PROCESSED, NO_HOST_ALIVE, NO_WEB_SERVICE, SERVICE_ERROR, TIME_LIMIT_REACHED, SCAN_INTERNAL_ERROR, SCAN_RESULTS_INVALID, SUCCESSFUL, PROCESSING, TIME_LIMIT_EXCEEDED, SCAN_NOT_LAUNCHED, SCANNER_NOT_AVAILABLE, SUBMITTED, RUNNING, FINISHED, CANCELED, CANCELING, ERROR, DELETED, CANCELED_WITH_RESULTS. |
Let us delete the scan with the ID 12405.
API request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"
"<qualys_base_url>/qps/rest/3.0/delete/was/wasscan/12405"
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/wasscan.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<WasScan>
<id>12405</id>
</WasScan>
</data>
</ServiceResponse>
Let us delete scans with a name that contains the string “VULN”.
API request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @-
"<qualys_base_url>/qps/rest/3.0/delete/was/wasscan" < file.xml
Note: “file.xml” contains the request POST data.
Request POST data
<ServiceRequest>
<filters>
<Criteria field="name" operator="CONTAINS">VULN</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/wasscan.xsd">
<responseCode>SUCCESS</responseCode>
<count>2</count>
<data>
<WasScan>
<id>12874</id>
</WasScan>
<WasScan>
<id>13093</id>
</WasScan>
</data>
</ServiceResponse>
<platform API server>/qps/xsd/3.0/was/wasscan.xsd