Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

iControl REST call for switching a specific traffic-group to standby

Hi all, we are looking for a way to trigger a failover for a specific traffic-group through an iControl REST call. Specifically, an equivalent for the tmsh command "run sys failover standby traffic-group my-traffic-group" is needed. Can anybody help? Many thanks in advance! Regards Martin

1
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

can you try (seems ok but i don't have a cluster to test on) :

POST /mgmt/tm/sys/failover/
{
"command":"run",
"standby":true,
"trafficGroup":"traffic-group-1"
 }
1
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Which version are you using ?

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

11.6.0 HF1

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Thanks, Arnaud! We'll give it a try and report about the results.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

curl -k -u admin:password https://x.x.x.x/mgmt/tm/sys/failover/ -H 'Content-Type: application/json' -X POST -d '{"command":"run","standby":true,"trafficGroup":"traffic-group-1"}'

works perfectly! Thanks for the hint, Arnaud!

0