How to Create/Modify iApp via API?
Hi! I've been trying to follow some of the articles I've found around this but am having no luck. I think I'm missing something simple but not sure what yet. Any help you can give would be greatly appreciated!
I created an iApp through the GUI to my liking. I then retrieved it via the API like this:
curl -sk -u 'admin:pass' -H "Content-Type: application/json" https://10.1.1.1/mgmt/tm/sys/application/service/~Common~MyCoolSite.app~MyCoolSite?expandSubcollections=true |python -m json.tool >MyCoolSite.json
If I try to make a change to the iApp json file and POST it back I get this message:
$ curl -sk -u 'admin:pass' -H "Content-Type: application/json" -X POST --data @MyCoolSite.json https://10.1.1.1/mgmt/tm/sys/application/service
{"code":400,"message":"{\"code\":400,\"message\":\"script did not successfully complete: (\\"none\\" invalid IP address\n while executing\n\\"tmsh::create [string range $args 7 end] \\"\n (\\"create\\" arm line 1)\n invoked from within\n\\"switch -exact -- [string range $args 0 5] {\n create { tmsh::create [string range $args 7 end] }\n modify { tmsh::modify [string r...\\"\n (procedure \\"iapp::conf\\" line 14)\n invoked from within\n\\"iapp::conf create ltm virtual ${app}_vs destination [iapp::destination $::pool__addr $::pool__port] mask $mask $vs_params ip-protocol tcp mirror ...\\"\n invoked from within\n\\"subst $substa_out\\"\n invoked from within\n\\"if { [info exists [set substa_in]] } {\n set substa_out [subst $$substa_in]\n set substa_out [subst $substa_out]\n } else {\n...\\"\n (\\"uplevel\\" body line 3)\n invoked from within\n\\"uplevel {\n append ::substa_debug \\"\\n$substa_in\\"\n if { [info exists [set substa_in]] } {\n set substa_o","errorStack":[]}
I have a feeling I'm missing something simple here 🙂
Any ideas on where I've gone wrong?
Thanks so much!