Forum Discussion

lizunjjg's avatar
Icon for Cirrus rankCirrus
Jul 22, 2019

use curl to call restapi

hi guys :

I used RESTAPI to create the AFM policy , but VIP cant call this policy.

This is my code and related code error:

[root@localhost /]# curl -sk -u 'admin:admin' -H "Content-Type:application/json" -X PUT -d '{"name":"vs_ddos","fwEnforcedPolicy":"policy_test"}'


{"code":403,"message":"Operation is not supported on component /ltm/virtual.","errorStack":[],"apiError":1}

  • Hi


    Try this


    curl -sk -u 'admin:admin' -H "Content-Type: application/json" -X PATCH -d '{"fwEnforcedPolicy":"/Common/policy_test"}'

5 Replies