Reply

Editing boolean script variables using netmri scripts API

Posts: 1
143     1

Hi all, 

We are currently calling a CCS script though the netmri "scripts" API and we want the api to have the ability to modify the script variables Boolean options to on or off but have not found a solution to do this yet. 

 

The reason why we are using Boolean options is so that this same script can be used in the GUI mode and API.

 

I have provided an example of the API code we are using below in the script with the output. What we have found out is we can pass the string text into the script variables, but we cannot pass the Boolean in. I think this is to that string is default and we are missing a command to set Boolean mode. What we are looking for is the Boolean mode to be set to on or off.

 

Script

Script-Variables:

$ChangeNumber string

$RecordLogs Boolean

 

API

/api/3.5/scripts/run?$ChangeNumber=example1&RecordLogs=on&name=APITEST&device_ids=1111111111&credential_mode=manual&username={{device_user}}&password={{device_pass}}&enable_password={{enable_pass}}

 

Output

Script-Variables:

$ChangeNumber =  “example1”

$RecordLogs = “”

Showing results for 
Search instead for 
Did you mean: 

Recommended for You