Forum Discussion
1 Reply
Sort By
This post shows some python code to get you going.
https://devcentral.f5.com/questions/native-tmsh-bash-commands-via-rest-api-51343
I tested it myself and it seems to work. I added an extra print(result.content) after the print("ok").
[nielsvs@localhost python]$ python run_bash_command.py ok {"kind":"tm:util:bash:runstate","utilCmdArgs":"-c 'uptime'","command":"run","commandResult":" 17:16:07 up 11 min, 0 users, load average: 1.84, 2.55, 1.83\n"} [nielsvs@localhost python]$