Cancel Scan

[POST] /qps/rest/3.0/cancel/was/wasscan/<id>

Cancel an unfinished scan on a web application which is in the user’s scope.

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

Input ParametersInput Parameters

The element “id” (integer) is required, where “id” identifies the scan.

Click here for available operators

Sample - Cancel the unfinished scanSample - Cancel the unfinished scan

Use parameter <cancelWithResults> to cancel the scan and still retain results. You can use the scan ID and generate a report to view the results.

API request

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/3.0/cancel/was/wasscan/168"          
    

Request POST data

<?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>168</id>
        </WasScan>
    </data>
</ServiceResponse>          
    

Sample - Cancel unfinished scan with scan resultsSample - Cancel unfinished scan with scan results

Cancel the unfinished scan that has the ID 168.

API request

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/3.0/cancel/was/wasscan/6620298"          
    

XML response

<ServiceRequest>
    <data>
        <WasScan>
            <cancelWithResults>true</cancelWithResults>
        </WasScan>
    </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/wasscan.xsd">
    <responseCode>SUCCESS</responseCode>
    <data>
        <WasScan>
            <id>6620298</id>
        </WasScan>
    </data>
</ServiceResponse>          
    

XSD<platform API server>/qps/xsd/3.0/was/wasscan.xsd