Creating a scan job based on templates
This REST service will create a scan job and an associated report pack based on a specific template. The name and description fields are supplied to the server using POST data.
HTTPS method
POSTService format
To create a job and report
pack in the root folder: /services/folderitems?templateid=<id>
To
create a job and report pack in a specific folder: /services/folders/<folderId>/folderitems?templateid=<id>
Query string parameters
- (Required)
templateid
: the scan template ID (See Retrieving a list of templates.)Note: The "templateid" must be a valid ID that you have access to in the Templates directory or any of its subfolders. - (Optional)
appid
: the application ID. Used to associate the job with an application.
POST data
Content-Type: application/x-www-form-urlencoded
name: the name of the scan
description: the description of the scan
payload: This is an optional data. This is needed only for the featurePosting AppScan Enterprise job results asynchronously to the configured endpoint URL. Find more information, refer https://support.hcl-software.com/csm?id=kb_article&sysparm_article=KB0011579
Returns
The new content scan job and report pack XML that were created.
Example:
Request:
POST /services/folderitems?templateid=<templateId>&appid=<appid>
name=<name of scan>&description=<description>
Response:
<folder-items>
<content-scan-job>
<id>56</id>
<name>new scan A</name>
<description>a new scan called A</description>
<parent href="https://localhost/ase/services/folders/1">
<id>1</id>
</parent>
<contact>Bill Smith</contact>
<state>
<id>1</id>
<name>Ready</name>
</state>
<action>
<id>1</id>
<name>None</name>
</action>
<options href="https://localhost/ase/services/folderitems/56/options" />
</content-scan-job>
<report-pack>
<id>57</id>
<name>new scan A</name>
<description>a new scan called A</description>
<parent href="https://localhost/ase/services/folders/1" />
<id>1</id>
</parent>
<contact>Bill Smith</contact>
<state>
<id>1</id>
<name>Ready</name>
</state>
<action>
<id>1</id>
<name>None</name>
</action>
<reports href="https://localhost/ase/services/folderitems/57/reports">
<count>4</count>
</reports>
</report-pack>
</folder-items>
Refer to documented schema for more details.