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

Firewall PUT method throws error 405 while updating Firewall Policy

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

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT