Traffic-Group Failover with IControl REST API
I am trying to use iControl REST api to failover my F5 LAB devices. This is a very small part of a bigger project.
Version: 12.1.0 Appliance/License: F5 Lab/Ve
Problem description:
- Following the guide at:
'https://devcentral.f5.com/wiki/iControlREST.APIRef_tm_sys_failover.ashx'
- I send a POST (use either CURL or Python Requests API), with the following JSON payload:
'{"command":"run","standby":true,"trafficGroup":"traffic-group-1"}'
against the following URL:
''
- A 200 HTTP response is returned with below JSON payload in the HTTP response body. Typically this would indicate the Request was successful but the F5 is not failing over to Standby and no signs of failover being triggered in /var/log/ltm. At this point I should state, failover works from TMSH and GUI:
'{"kind":"tm:sys:failover:runstate","command":"run","standby":true,"trafficGroup":"traffic-group-1"}'
So, It seems the REST api accepts my request but does not do anything with it??
My Questions:
-
How can I switch '/var/log/restjavadaudit.0.log' into debug so as I can understand why my request is not being processed correctly? (I did not see the DB keys for that, does such a key exist?)
-
In the API reference (linked above) it seems to imply the I should be using ~resource id at the end of the URI /mgmt/tm/sys/failover/. I cannot think what resource should be specified since the default traffic-group is in Common and I specify the traffic-group in the JSON payload. Am I missing something obvious?
Thanks in Advance for your answers.