Forum Discussion

Tony_D__Dodd's avatar
Icon for Nimbostratus rankNimbostratus
Jul 29, 2016

LTM Tfaffic Policies via iControlRest

Prior to v12.1.0 I had an automation script which we run in batches of dozens to hundreds of VIP, Pool, Profile, Policy, etc creations. The script utilizes the Rest interface to create Policies and after Vip creation, it applies the policies. Much to my surprise after our network team upgraded some of our F5s to v12.1.0 last week, the Policy creation broke. I explored this in the GUI and see the problem. There is now a "draft" phase introduced before published policies. I managed to tinker with my powershell and successfully create a new "draft" policy. However, I cannot successfully get the draft policy published via the Rest interface. Does anyone know how this can be accomplished programmatically? Using the GUI is not a viable option when I am building out hundreds of Policies at a time.


5 Replies

  • We were able to find a solution to this. The answer is to make a post request to the policy root with the following JSON body: {command: "publish", name: "/Common/Drafts/targetpolicy"} Request URL: Request Method: POST


  • Thanks for answering your own question Tony! That saved us a lot of searching.


    @F5 and community Could we get a supported/official answer on this? I noticed this still works in 12.1 but it doesn't really feel 'RESTy' to post a command like this so I'm worried that this might get deprecated in the future. The API docs do not document the publishing of ltm policiese at all as far as I can tell.


    Thanks a bunch,


    a happy iControl REST user,


  • Hi, someone from F5, please take a look on this. I have exactly same thoughts that this "strange" way of creating draft policy via API Rest might be deprecated in future. What's the plan??