Import Scripts

Import scripts into CAR. Importing a script only imports the script details and excludes the meta data such as asset details.

POST/sm/v1/scripts/import

Response CodeResponse Code

200, 409, 429, 500

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

Input ParametersInput Parameters

Parameter    
     

File (form-data) option in request body.

 

Browse and select the file to be imported.

Note: The file must be in .json) format.

Authorization (String)

 

(Required) Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform.

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

SampleSample

API Request:

 "curl--location--requestPOST""https://qualys_base_url/sm/v1/scripts/import""\\
--header""Content-Type:multipart/form-data;boundary=<calculated_when_request_is_sent>""\\
--header""Authorization:Bearer<authToken>""\\
--form""file=@\"/C:/Users/abc/Downloads/ExportedScripts_202205050712.json\"" 

Response:

 {
"ImportedIds":"[16508]"
}