Skip to main content
veeraselvam_m
New Member
June 3, 2019
Question

Fortigate Firewall Rest API

  • June 3, 2019
  • 1 reply
  • 18875 views

Hi,

Currently am leaning Fortigate Rest API methods, now we are using CLI commands to manage our fortigate firewalls.

If possible please share equivalent rest API methods for below CLI commands:

[ol]
  • show firewall policy
  • show full-configuration[/ol]

    It would better if anyone share the proper Fortigate rest API document link.

     

    Thanks & Regards, M.Veeraselvam.

     

    • 1 reply

      Irfan_Pathan
      New Member
      August 10, 2019
      emnoc
      New Member
      August 11, 2019

      http://socpuppet.blogspot.com/2018/07/howto-use-fortios-api-to-add-delete.html

       

      FWIW, I do not think you can call a API get and show the full configuration. I used API in host of firewall ( Junos/TNSR/FortiOS/Forcepoint/CHKP)  and restFUL have specific calls for elements. Extract a fully configuration would most likely not be possible

       

      Ken Felix

      Irfan_Pathan
      New Member
      August 11, 2019
      I used FortiOS 6.2.1 to deploy this, and it is most likely not working with other version(especially 5.x). 1. Create access profile for API user 2. Create API user in Fortigate 3. Generate API token for API user copy token. then curl -k 'https://firewall_ip_addre...ken=api_key_token'