Forum Discussion
iControlREST and POST method to enable or disable members
Hi All,
I followed Jason Rahms articles on iControlREST. With GET method I always get a useful result - so far so good.
I work with POST method as well. Is there a limitation of some kind with POST method to use to change parameters of objects?
The POST works fine to add a pool .../mgmt/tm/ltm/pool/ and also to change the monitor to http with a JSON like { "name" : "/mypartition/mypool", "monitor" : "http" }
This took me to the next step to enable or disable members in a pool. Easy query with .../mgmt/tm/ltm/pool/~mypartition~mypool/members. But when I issue a POST with that uri and a JSON like { "name" = "myMember", "session" : "user-disabled" } I always receive a 400 code. Have you any ideas how to approach or fix this?
Cay
This should point you in the right direction
https://devcentral.f5.com/articles/icontrol-rest-working-with-pool-members
In summary, you need to add the "state": "unchecked" as well as "session" : "user-disabled"
Cheers Steve
This should point you in the right direction
https://devcentral.f5.com/articles/icontrol-rest-working-with-pool-members
In summary, you need to add the "state": "unchecked" as well as "session" : "user-disabled"
Cheers Steve
- Cay_Jeglinski_1NimbostratusHi Steve! Thank you for your post! It was just the way to go! Cheers! Here the solution in case somebody uses partitions as well. Enable the member with: curl -sk -u admin:admin https://waymuc01.waysoft.de/mgmt/tm/ltm/pool/~webfarm-WAY~way-pool3/members/~webfarm-WAY~srvweb16.waysoft.de:80/ -H "Content-Type: application/json" -X PUT -d '{"state": "user-up", "session": "user-enabled"}' To disable the member I used: curl -sk -u admin:admin https://waymuc01.waysoft.de/mgmt/tm/ltm/pool/~webfarm-WAY~way-pool3/members/~webfarm-WAY~srvweb16.waysoft.de:80/ -H "Content-Type: application/json" -X PUT -d '{"state": "user-up", "session": "user-disabled"}' Cheers again Steve! Cay
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