Delete Web Application

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

[POST] /qps/rest/3.0/delete/was/webapp/<filters>

Delete a web application configuration in your account.

Permissions required - User must have WAS module enabled. A User account must have these permissions: Access Permission “API Access” and WAS Asset Permission “Delete Web Asset”. The web application to be deleted must be within the user’s scope.

 The /qps/rest/3.0/delete/was/webapp/ API does not remove the web application from your subscription. You must use the removeFromSubscription filter in the API request to ensure that the specified web applications are removed from your subscription.

Input ParametersInput Parameters

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

Web application ID.

name

Optional

text

Web application name.

url

Optional

text

The URL of web application.

tags.name

Optional

text

Tag name assigned to web application.

tags.id

Optional

integer

Tag ID assigned to web application.

createdDate

Optional

date

The date when the web application was created in WAS, in UTC date/time format.

updatedDate

Optional

date

The date when the web application was last updated in WAS, in UTC date/time format.

isScheduled

Optional

boolean

A flag indicating whether a scan is scheduled for web application.

isScanned

Optional

boolean

A flag indicating whether the web application has been scanned.

lastScan.status

Optional

keyword

Scan status reported by last web application scan: SUBMITTED, RUNNING, FINISHED, TIME_LIMIT_EXCEEDED, SCAN_NOT_LAUNCHED, SCANNER_NOT_AVAILABLE, ERROR or CANCELED

lastScan.date

Optional date

(date) Date when web application was last scanned, in UTC date/time format.

Sample - Delete a single web applicationSample - Delete a single web application

Let us delete the web application that has the ID 1234.

API request

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

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/webapp.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <WebApp>
            <id>1234</id>
        </WebApp>
    </data>
</ServiceResponse>

Sample - Delete bulk web applicationsSample - Delete bulk web applications

Let us delete web applications in the user’s account that have a name with the word “Merchant” and have an ID greater than 323000.

API request

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

Request POST data

<ServiceRequest>
    <filters>
        <Criteria field="name" operator="CONTAINS">Merchant</Criteria>
        <Criteria field="id" operator="GREATER">323000</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/webapp.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>3</count>
    <data>
        <WebApp>
            <id>323126</id>
        </WebApp>
        <WebApp>
            <id>324256</id>
        </WebApp>
        <WebApp>
            <id>323476</id>
        </WebApp>
    </data>
</ServiceResponse>      
    

sample - Delete single web applications and remove the web applications from subscriptionsample - Delete single web applications and remove the web applications from subscription

API request

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

Request POST data

<ServiceRequest>
    <data>
        <WebApp>
            <id>28297457</id>
        </WebApp>
    </data>
</ServiceRequest> 

XML response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <?xml version="1.0" encoding="UTF-8"?>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/3.0/was/webapp.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <WebApp>
            <id>30099384</id>
        </WebApp>
    </data>
</ServiceResponse>   
    

Sample - Delete multiple web applications and remove the web applications from subscriptionSample - Delete multiple web applications and remove the web applications from subscription

API request

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

Request POST data

<ServiceRequest>
    <filters>
        <Criteria field="name" operator="CONTAINS">API - New Web App for delete</Criteria>
        <Criteria field="id" operator="LESSER">28297453</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/webapp.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>2</count>
    <data>
        <WebApp>
            <id>28297451</id>
        </WebApp>
        <WebApp>
            <id>28297452</id>
        </WebApp>
    </data>
</ServiceResponse>
    

XSD

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