Skip to main content
luckyt
New Member
February 17, 2018
Question

Firewall PUT method throws error 405 while updating Firewall Policy

  • February 17, 2018
  • 1 reply
  • 6333 views

Hi,

 

While updating Firewall Policy via REST Api's PUT method, i'm getting http 405 error. Can someone post sample on updating policy?

 

PUT https://fgip/api/v2/cmdb/...l/policy/76/?vdom=root

Body:

{     "name": "test76",     "srcintf": [{         "name": "MGMT"     }],     "dstintf": [{         "name": "Access"     }],     "srcaddr": [{         "name": "172.20.5.0/24"     }],     "dstaddr": [{         "name": "any"     }],     "action": "accept",     "status": "disable",     "service": [{         "name": "ALL"     }],     "schedule": "always", }

 

Response:

{   "http_method": "PUT",   "status": "error",   "http_status": 405,   "vdom": "root",   "name": "test76",   "action": "accept",   "serial": "FG100Exxxxxx",   "version": "v5.4.6",   "build": 6408 }

 

1 reply

oheigl
New Member
February 19, 2018

Try it with this URL:

/api/v2/cmdb/firewall/policy/?vdom=root

 

And add the ID of the policy in the Body