Update Schedule

[POST] /qps/rest/3.0/update/was/wasscanschedule/<id>

Update a scheduled 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 “Edit WAS Schedule”. Scan target must be within the user’s scope.

Input ParametersInput Parameters

The “id” (integer) element and the data to be updated in the schedule are required where “id” identifies a schedule. See Reference: WasScanSchedule for descriptions of all of the <WasScanSchedule> elements.

Click here for available operators

Sample - Update a schedule by enabling notification for the sameSample - Update a schedule by enabling notification for the same

API request

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

Request POST data

<ServiceRequest>
    <data>
        <WasScanSchedule>
            <notification>
                <active>true</active>
                <delay>
                    <nb>4</nb>
                    <scale>DAY</scale>
                </delay>
                <recipients>
                    <set>
                        <EmailAddress>
                            <![CDATA[name1@company.com]]>
                        </EmailAddress>
                        <EmailAddress>
                            <![CDATA[name2@company.com]]>
                        </EmailAddress>
                        <EmailAddress>
                            <![CDATA[name3@company.com]]>
                        </EmailAddress>
                    </set>
                </recipients>
                <message>
                    <![CDATA[The schedule notification message]]>
                </message>
            </notification>
        </WasScanSchedule>
    </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/wasscanschedule.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <WasScanSchedule>
            <id>1688</id>
        </WasScanSchedule>
    </data>
</ServiceResponse>      
    

Sample - Update notification to rescheduleSample - Update notification to reschedule

API request

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

Request POST data

<ServiceRequest>
    <data>
        <WasScanSchedule>
            <name>
                <![CDATA[Update Notification to enable Reschedule]]>
            </name>
            <notification>
                <active>true</active>
                <reschedule>true</reschedule>
                <delay>
                    <nb>1</nb>
                    <scale>DAY</scale>
                </delay>
                <message>
                    <![CDATA[A Qualys scan is scheduled to start soon.]]>
                </message>
            </notification>
        </WasScanSchedule>
    </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/wasscanschedule.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <WasScanSchedule>
            <id>171425669</id>
        </WasScanSchedule>
    </data>
</ServiceResponse>      
    

Sample - Update schedule to configure scan completion notificationSample - Update schedule to configure scan completion notification

API request

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

Request POST data

<ServiceRequest>
    <data>
        <WasScanSchedule>
            <name>Schedule with sendOneMail enabled</name>
            <sendMail>true</sendMail>
            <sendOneMail>true</sendOneMail>
        </WasScanSchedule>
    </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/wasscanschedule.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <WasScanSchedule>
            <id>171425669</id>
        </WasScanSchedule>
    </data>
</ServiceResponse>      
    

XSD

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