Forum Discussion
12.1.2: iControlRest, How to add members to pool
Greetings, I use curl to make the call which is of course quite different. The call is:
curl -k -u admin:admin https://172.24.17.16/mgmt/tm/ltm/pool/~Common~test-pool/members -H "Content-Type: application/json" -X POST -d '{"name":"10.12.23.29:80","address":"10.12.23.29"}'
In comparing the two, I notice the pool portion has both the partition name and the string "members". Then the new member definition, there's simply the "name" and "address".
Is it possible to adjust your syntax a bit to see if that works?
/mgmt/tm/ltm/pool/~partition~nameOfPool/members
[{"name":"test01","address":"x.x.x%x","partition":"zzz"},
{"name":"test02","address":"x.x.x.x%x","partition":"zzz"}]
Sadly, when I put it in that format the response is:
{"code":400,"message":"Found invalid JSON body in the request. The expected JSON type is object. The received JSON type is array.","errorStack":[],"apiError":1}
It doesn't like it as an array instead of a JSON string.
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
