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 }
Try it with this URL:
/api/v2/cmdb/firewall/policy/?vdom=root
And add the ID of the policy in the Body
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.