Forum Discussion

Zdenda's avatar
Zdenda
Icon for Cirrus rankCirrus
Jan 24, 2019

Api Rest - create draft copy from published policy

Hi, cannot find the way to create draft copy of LTM policy. Documentation doesn't help, I tried similar way as publishing policy -> {command: "publish", name: "/Common/Drafts/targetpolicy"}, but instead of command "publish" I tried {command: "createDraft", name: "/Common/targetpolicy"} without luck..

Error response I got:

{ "code": 501, "message": "0 is not supported ", "errorStack": [], "apiError": 1 }

Does anyone know how to create draft copy from already published policy?

THx, Zdenek

3 Replies

  • You are after tmsh modify ltm policy create-draft equivalent, right? Can you try this?

     

     

    curl -sku : \
      https:///mgmt/tm/ltm/policy/?options=create-draft \
      -X PATCH -H "Content-type: application/json" \
      -d '{}'
    

     

  • Are you saying that the method you tried worked before in an older version, but stopped working after upgrade? If that were the case, please give us the version numbers and the exact syntax (HTTP method, endpoint and payload). Thanks.

     

  • The ?options query parameter is described in iControl® REST API User Guide Version : e.g., from p. 29 of the version 13.1 doc says:

    options: Specifies the options to a query request. This parameter takes values that are compatible with the tmsh command-line options.