Forum Discussion
iControl REST API Pool Member disable
- Feb 12, 2024
also FYI...if you get a working postman sample, you can click the </> icon and find samples in a lot of tools/languages of that specific query.
And the python sample they shared from my working postman PATCH is:
import requests import json url = "https://ltm15/mgmt/tm/ltm/pool/~Common~nginx-pool/members/~Common~172.16.102.5:80" payload = json.dumps({ "session": "user-disabled", "state": "user-down" }) headers = { 'Content-Type': 'application/json', 'Authorization': 'Basic notsofastmyfriends', 'Cookie': 'BIGIPAuthCookie=supersecretpassphrasehere; BIGIPAuthUsernameCookie=admin' } response = requests.request("PATCH", url, headers=headers, data=payload) print(response.text)
hi ashk I've had spotty success with PATCH but more consistent success with PUT on pool member state changes. also don't think it's the issue but you use the partition on your pool member object but not your pool object. Your json payload looks fine here, but make sure your quotes aren't smart quotes and I like to see spaces between the key/value pairs.
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