Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
luckyt
New Contributor

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 1
oheigl
Contributor II

Try it with this URL:

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

 

And add the ID of the policy in the Body

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors