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.
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.
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>
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>
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>
<platform API server>/qps/xsd/3.0/was/wasscanschedule.xsd