基于模板创建扫描作业

该 REST 服务将基于特定模板创建扫描作业和关联的报告包。使用 POST 数据向服务器提供名称和描述字段。

HTTPS 方法

POST

服务格式

要在根文件夹中创建作业和报告包: /services/folderitems?templateid=<id>

要在特定文件夹中创建作业和报告包: /services/folders/<folderId>/folderitems?templateid=<id>

查询字符串参数

  • (必需)templateid:扫描模板标识(请参阅检索模板列表。)
    注: “templateid”必须是您可以在“模板”目录或其任何子文件夹中访问的有效标识。
  • (可选)appid:应用程序标识。用于将作业与应用程序关联。

POST 数据

内容类型:application/x-www-form-urlencoded

名称:扫描的名称

描述:扫描的描述

有效内容:这是可选数据。仅将 AppScan Enterprise 作业结果异步发布到配置的端点 URL功能需要。有关更多信息,请参阅 https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0011579

返回值

创建的新内容扫描作业和报告包 XML。

示例:

请求:

POST /services/folderitems?templateid=<templateId>&appid=<appid>

name=<name of scan>&description=<description>

响应:

<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>				  	  

请参阅文档记录的模式以获取更多详细信息。

下一步的操作

配置作业选项