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

Fortigate Firewall Rest API

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.

     

  • 3 REPLIES 3
    Irfan_Pathan
    New Contributor III

    emnoc
    Esteemed Contributor III

    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

    PCNSE 

    NSE 

    StrongSwan  

    PCNSE NSE StrongSwan
    Irfan_Pathan
    New Contributor III

    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'
    Labels
    Top Kudoed Authors