For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Mark_Saunders_1's avatar
Mark_Saunders_1
Icon for Altostratus rankAltostratus
Jun 07, 2016

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

  • 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.