Forum Discussion

Service_Support's avatar
Service_Support
Icon for Nimbostratus rankNimbostratus
Nov 19, 2015

Adding IP to existing pool in non-Common partition via REST API

Hi guys,

 

I'm trying to add an IP address to an existing pool using rest api. It works fine in Common partition, but I'm a bit lost trying to do exactly the same thing in other partition. I'm trying to do it like that:

 

curl -sk -u '$username:$password' -H "Content-Type: application/json" -X PUT https://$HOSTNAME/mgmt/tm/ltm/pool/CPL-P-POOL-199_CLDFRM/ -d '{"name":"CPL-P-POOL-199_CLDFRM","partition":"pfi2_back","members":[{"name":"$IP:80"}]}'

 

and I'm getting the following response:

 

{"code":404,"message":"01020036:3: The requested pool (/Common/CPL-P-POOL-199_CLDFRM) was not found.","errorStack":[]}

 

which clearly means I'm passing partition in a wrong way. However, I'm just following official iControl REST USER doc, so can't see what should be changed.

 

Would appreciate any ideas or pointers.

 

Many thanks.

 

1 Reply

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    You would need to specify the Partition in the URI e.g. ~pfi2_back~/poolname

     

    You'd then only need the members section too (i.e. no need for "name":"CPL-P-POOL-199_CLDFRM","partition":"pfi2_back")

     

    Hope this helps.

     

    N