Forum Discussion
Sandeep_Rawat
Sep 29, 2020Nimbostratus
Unable to Disable a Wide IP using REST API
I am new to F5, and I am trying to get a WIDE IP disabled from serviceNow using REST APIs.
I am using the information provided in the below link but no luck so far.
I am using the endpoint as https://<ip address of device>/mgmt/tm/gmt/working-config/wideip/a/<id> "<id> I am replacing with dns farm name".
There is no error, but wide-ip remains enabled.
Hello Sandeep.
If the initial state of the Wide IP is enabled.
# curl -sku admin:admin https://localhost/mgmt/tm/gtm/wideip/a/wideip.mydomain.com | json-format { "kind": "tm:gtm:wideip:a:astate", "name": "wideip.mydomain.com", "fullPath": "wideip.mydomain.com", "generation": 1659, "selfLink": "https://localhost/mgmt/tm/gtm/wideip/a/wideip.mydomain.com?ver\u003d12.1.5", "enabled": true, "failureRcode": "noerror", "failureRcodeResponse": "disabled", "failureRcodeTtl": 0, "lastResortPool": "", "minimalResponse": "enabled", "persistCidrIpv4": 32, "persistCidrIpv6": 128, "persistence": "disabled", "poolLbMode": "round-robin", "ttlPersistence": 3600 }
You can disable it like this.
# curl -sku admin:admin -X PUT https://localhost/mgmt/tm/gtm/wideip/a/wideip.mydomain.com -H 'Content-Type: application/json' -d '{ "disabled": true }' | json-format { "kind": "tm:gtm:wideip:a:astate", "name": "wideip.mydomain.com", "fullPath": "wideip.mydomain.com", "generation": 1661, "selfLink": "https://localhost/mgmt/tm/gtm/wideip/a/wideip.mydomain.com?ver\u003d12.1.5", "disabled": true, "failureRcode": "noerror", "failureRcodeResponse": "disabled", "failureRcodeTtl": 0, "lastResortPool": "", "minimalResponse": "enabled", "persistCidrIpv4": 32, "persistCidrIpv6": 128, "persistence": "disabled", "poolLbMode": "round-robin", "ttlPersistence": 3600 }
Regards,
Dario.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects