Forum Discussion
Error when using iControl REST with url: https://LTM-IP/mgmt/tm/net/self?$select=address
LTM Version: BIG-IP 11.6.0 Build 6.0.442 Hotfix HF6
BigIP::iControl version: 0.098 (current version)
When I type the following URL into my LTM, it returns valid data:
$select=address
However, when I attempt to retrieve this info via Perl/iControl REST, I get an error.
Code:
open($FILE, '-|', 'curl -k -u' . $F5User . ":" . $F5Pass . ' -v https://' . $LTM . '/mgmt/tm/ltm/net/self?\$select=address 2>/dev/null') or die $!;
while ($line = <$FILE>) { print "$line\n"; }
Error:
{"code":400,"message":"Found unexpected json pair at module /ltm. The json pair is \"net\":{\"self\":null}.","errorStack":[]}
This appears to be a bug in iControl REST, as I am able to retrieve other information successfully with this method.
Is there a work-around?
Thanks,
1 Reply
- cjunior
Nacreous
Hi, I think you made a mistake.
The net scope is out of ltm path as you did in the browser request. Something like this should be valid:open($FILE, '-|', 'curl -k -u ' . $F5User . ":" . $F5Pass . ' -v https://' . $LTM . '/mgmt/tm/net/self?\$select=address 2>/dev/null') or die $!;Regards.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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