Forum Discussion
Michael_Jenkins
Jul 29, 2015Cirrostratus
iControlREST (11.5) - execute bash command
I've been playing with iControlREST recently, and trying to port some old iControl scripts over. Most of them work nicely, but I've got one that requires running a bash command (for example purposes,...
Kevin_Stewart
Jul 29, 2015Employee
Try this:
curl -vsk -u 'admin:admin' -H "Content-Type: application/json" -X POST https://192.168.1.252/mgmt/tm/util/bash -d "{\"command\":\"run\",\"utilCmdArgs\":\"-c 'echo "works"'\"}"
You're somewhat limited with what you can do with Bash, for example you couldn't directly execute a binary file like 'ls', but then you could script it and then call the script:
https://devcentral.f5.com/questions/can-icontrol-rest-delete-a-connection
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects