PHP and iControl REST
Problem this snippet solves: PHP and iControl REST interfaces
Here are a couple of ways to use PHP and iControlREST (iCR). iCR is lighter-weight than iControl SOAP but is only supported on >= v1...
Updated Jun 06, 2023
Version 2.0PeteWhite
Employee
Joined May 16, 2019
Santosh_70018
Nov 28, 2016Nimbostratus
Hi Pete, I am trying to use similar code sent by you but to fetch pools. The output format is not what I expected, below is the snippet of the response :
stdClass Object ( [kind] => tm:ltm:pool:poolcollectionstate [selfLink] => $select=name&ver=11.6.1 [items] => Array ( [0] => stdClass Object ( [name] => CTUSOPService_IAT )
[1] => stdClass Object
(
[name] => adptlm
)
And I expected it to be like below :
{ "kind":"tm:ltm:pool:poolcollectionstate", "selfLink":"$select=name&ver=11.6.1", "items":[ { "name":"CTUSOPService_IAT" }, { "name":"adptlm" },
Any reason why this is happening..? My intention is to use JsonPath against the output to fetch the required fields. Eg : $.items[*].name