Download the selenium script file that is associated with the web application.
Permissions required - User must have WAS module enabled. User account must have these permissions: Access Permission “API Access” and WAS Asset Permission “View/download Selenium Script sensitive contents.” The web application to be purged must be within the user’s scope.
The element “id” (integer) is required, where “id” identifies a web application.
Let us download the selenium script file associated with a web application with ID 1234.
API request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml"-X "POST"--data-binary @- <qualys_base_url>//qps/rest/3.0/downloadSeleniumScript/was/webapp/" < file.xml"
Note: “file.xml” contains the request POST data.
Request POST data
<ServiceRequest>
<filters>
<Criteria field="id" operator="EQUALS">1234</Criteria>
<Criteria field="crawlingScripts.id" operator="EQUALS">2500</Criteria>
</filters>
</ServiceRequest>
XML response
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://10.10.26.238" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">New Test</td>
</tr>
</thead>
<tbody>
<tr>
<td>open</td>
<td>http://10.10.26.238/</td>
<td/>
</tr>
<tr>
<td>type</td>
<td>name=login</td>
<td>admin</td>
</tr>
<tr>
<td>type</td>
<td>name=password</td>
<td>abc123</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=submit</td>
<td/>
</tr>
</tbody>
</table>
</body>
</html>
<platform API server>/qps/xsd/3.0/was/webapp.xsd