根據範本來建立掃描工作

這個 REST 服務會根據特定的範本,來建立掃描工作和相關聯的報告套件。名稱和說明欄位會利用 POST 資料提供給伺服器。

HTTPS 方法

POST

服務格式

在根資料夾中建立工作和報告套件: /services/folderitems?templateid=<id>

在特定資料夾中建立工作和報告套件: /services/folders/<folderId>/folderitems?templateid=<id>

查詢字串參數

  • (必要)templateid:掃描範本 ID(請參閱擷取範本清單)。
    註: "templateid" 必須是您可在「範本」目錄或其任何子資料夾中存取的有效 ID。
  • (選用)appid:應用程式 ID。用來將工作與應用程式產生關聯。

POST 資料

Content-Type:application/x-www-form-urlencoded

name:掃描的名稱

description:掃描的說明

payload:這是選用資料。只有將 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>				  	  

請參閱記載在文件中的綱目,以取得詳細資料。

下一步

配置工作選項