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"}]
- Zane_B_332165Sep 13, 2017
Nimbostratus
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.
- Kevin_K_51432Sep 13, 2017Historic F5 Account
Frustrating, I notice in your original you have "member". Have you tried "members"? Really grasping and wishing I know JSON better =(
- Zane_B_332165Sep 14, 2017
Nimbostratus
Kevin, thank you so much.
It appears that the pdf for 12.1.2 had some errors. It is in fact "members" -- and I'm kinda kicking myself for not thinking to try that.
I'd upvote the comment if I could!
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
