Import Scripts API

This API lets you import scripts from the Library.

POSTsm/v1/script-library/import

Input ParametersInput Parameters

Parameter Mandatory/Optional Data Type Description
title Mandatory String Name of the script to be imported
categodyID Mandatory String Category ID of the script to be imported
approved Mandatory Boolean Status of the script to be imported {true/false}
id Mandatory String ID of the script in the library
typeId Mandatory Integer Provide a valid script type ID (Custom Script/Custom QID).

SampleSample

API Request

 curl -X POST 'https://<qualys_base_url>/sm/v1/script-library/import' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{authToken}}' \
--data 
'{
 "title": "Sample Title",
 "categoryId": 1,
 "id": 234564,
 "approved": true/false,
 "typeId": 1
}'

Response

{
 "errorCode": "0",
 "message": "Script created from library successfully",
 "body": {
 "id": 86174
 }
} 

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