For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

mpeck's avatar
mpeck
Icon for Nimbostratus rankNimbostratus
Jun 04, 2021

Formatting iControl API command into JSON body using curl

We are trying to execute the following from the i-control API using curl and are having issues figuring out the JSON body specifically.

 

• Command we wish to run via API/curl --> run util bash -c "tmsh -c \"run cli script classMod chbe_app_a03_base.class Display\””

 

We want to format that into the json body using curl and/or postman using the –d flag. Something like below, but this is failing along with several other attempts we have made. This will be executed as a bash command as that is how ansible is doing it, so we want to emulate that.  

 

• -d "{\"command\":\"run\", \"utilCmdArgs\":\"-c 'run cli script classMod chbe_app_a03_base.class Display\\\" | tmsh'\"}"

 

If someone has and could share a working example of doing this it would be much appreciated.

No RepliesBe the first to reply