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

Failed dependecy for the firewall policy POST method

Hello Community,

 

I am attempting to POST an additional firewall policy using the API method. Getting back a 424 Failed dependency. I have always included the API key, and have also tried optionally setting vdom,  datasouce, and with_meta but none resolved the issue. Although they are all not checked in the screenshot, they each have been tried. Here is a screenshot from Postman.

 

Screenshot from 2023-02-06 09-40-10.png

 

Body is JSON format, as follows

{
    "name": "TEST",
    "srcintf": [
      {
        "name": "lan"
      }
    ],
    "dstintf": [
      {
        "name": "lan"
      }
    ],
    "action": "accept",
    "srcaddr": [
      {
        "name": "all"
      }
    ],
    "dstaddr": [
      {
        "name": "all"
      }
    ],
    "schedule": {
      "q_origin_key": "always"
    },
    "service": [
      {
        "name": "ALL"
      }
    ],
    "nat": "enable"
 }

Any thoughts on what this could be depending on?

 

Appreciate it

1 REPLY 1
gfleming
Staff
Staff

For API POST and PUT methods you need to include the CSRF Token. You can only access GET requests with the API Key.

Cheers,
Graham