Introducing SOC Insights for BloxOne Threat Defense: Boost your SOC efficiency with AI-driven insights to eliminate manual work and accelerate investigation and response times. Read the blog announcement here.

Automation Scripts


How to pass long lines of code via NetMRI WAPI?

Posts: 10
1943     0

Hi Everyone,


My name is Nidhi and I have a question for NetMRI wapi for Network Automation. I'm creating a scheduled job in netMRi using python WAPI, I have successfully created a Job which I see in NetMRI with exact lines of codes 

Here is my wapi which I used


net_mri_job = 'XXXX//job_specifications/create.json?name=TEST_JOB&script_id=XX&device_ids='+str(dev_id)+'&schedule=0 0 1 1 2&$commands_to_be_executed='+data;


data = "One bing sting of commands"


When this Job is pushed to the device it failed with the below error message.


*** Error evaluation line($commnad_to_be_executed = 'edit line1 line2 line 3...')


can someone advise how to preserver a new line within wapi call?




I posted a similar question couple of years ago when I was using Perl API. Smiley Happy


I would appreciate an early response.



Nidhi Srivastava



Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin