Forum Discussion
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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com