Clone Scripts API

Clone a script by using script ID or script name. Even if you clone an approved script, you must get it reviewed and approved before you execute it.

You cannot clone deprecated and rejected scripts.

POST/sm/v1/scripts/{scriptId}/clone

Input ParametersInput Parameters

Parameter Mandatory/Optional Data Type Description

Script name/ script ID as Path parameter

 Optional

 

Name or ID of the script to be cloned.

Authorization 

 Mandatory

String

Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform.

Prepend the token with "Bearer", followed by a space. For example, Bearer authToken

scriptTitle 

 Optional

String

Name of the newly cloned script.

Note: Duplicate script name is not allowed.

SampleSample

API Request

 curl--location--requestPOST'https://qualys_base_url/sm/v1/scripts/{ScriptId/ScriptName}/clone'\
--header'Content-Type:application/json'\
--header'Authorization:Bearer '\

--data-raw '{
"scriptTitle":"NewClonedScript"
}    

 Request Body

{
   "scriptTitle":"<SCRIPT NAME>"
}

Response

 {
"errorCode":"0",
"message":"Cloned script successfully",
"body":{
"id":16520
}
}

To know the details of the response codes, refer to Appendix.