Forum Discussion
REST API to take a pool member to offline/online in F5 ltm
I am trying to bring a pool member offline during maintenance and bring it back to online once maintenance is over. My device F5 LTM. Is there any REST API to do this (which can help me in taking a pool member to offline and bring it back online using REST API)?.
2 Replies
- tatmotiv
Cirrostratus
Using curl, you could do it like that:
DISABLE pool member: curl -sk -u admin:password https://1.2.3.4:443/mgmt/tm/ltm/pool/~Common~testweb_pool/members/~Common~host1:80 -H 'Content-Type: application/json' -X PUT -d "{\"session\":\"user-disabled\"}" ENABLE pool member: curl -sk -u admin:password https://1.2.3.4:443/mgmt/tm/ltm/pool/~Common~testweb_pool/members/~Common~host1:80 -H 'Content-Type: application/json' -X PUT -d "{\"session\":\"user-enabled\"}"You can adopt this using any language / REST client you like.
HTH
Martin
- TayF5un
Nimbostratus
curl -sk -u ankara:ankara https://192.168.66.66/mgmt/tm/ltm/pool/testpool/members/~Common~66.66.66.66:66/ -H "Content-Type: application/json" -X PUT -d '{"state": "user-down", "session": "user-disabled"}'
{"state": "user-down", "session": "user-disabled"} (Member Forced Offline in GUI) {"state": "unchecked", "session": "user-disabled"} (Member Disabled in GUI) {"state": "unchecked", "session": "user-enabled"} (Member Enabled in GUI) 1
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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