Forum Discussion
F5 iControl Rest API to get Stats of GTM pool members returns "Object not found" error when GTM server name has space character
I believe this is a bug ID795633, which has not been fixed yet. Because the equivalent tmsh command can be run, as a workaround, you can make a POST call against /mgmt/tm/util/bash to run the tmsh command. For example,
curl -sku $PASS https://$HOST/mgmt/tm/util/bash \
-H "Content-type: application/json" \
-X POST \
-d '{"command":"run", "utilCmdArgs": "-c \"tmsh list gtm pool a SNS_Pool members { \\\"DNS_Google2:Google server\\\" }\""}'
It is indeed ugly, but does the job. The output from the tmsh can be found in the "commandResult" property in the response body. The line terminator (LF) is represented as the literal '\n' (0x 5c 6e), so additional processing is necessary to get something readable. For example, pipe the output to the following Python one-liner.
| python -c 'import sys,json; print json.load(sys.stdin)["commandResult"]'
I hope this helps.
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