Hot!Fortigate Firewall Rest API

Author
veeraselvam.m@zohocorp.com
New Member
  • Total Posts : 1
  • Scores: 0
  • Reward points: 0
  • Joined: 2019/05/31 04:39:48
  • Status: offline
2019/06/02 22:32:01 (permalink)
0

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:
  1. show firewall policy
  2. show full-configuration
It would better if anyone share the proper Fortigate rest API document link.
 


Thanks & Regards,
M.Veeraselvam.
 
#1

3 Replies Related Threads

    Irfan Pathan
    New Member
    • Total Posts : 11
    • Scores: 0
    • Reward points: 0
    • Joined: 2012/08/13 04:51:23
    • Location: Indore (India)
    • Status: offline
    Re: Fortigate Firewall Rest API 2019/08/10 10:16:28 (permalink)
    #2
    emnoc
    Expert Member
    • Total Posts : 5387
    • Scores: 353
    • Reward points: 0
    • Joined: 2008/03/20 13:30:33
    • Location: AUSTIN TX AREA
    • Status: offline
    Re: Fortigate Firewall Rest API 2019/08/11 07:16:26 (permalink)
    0
    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  
    #3
    Irfan Pathan
    New Member
    • Total Posts : 11
    • Scores: 0
    • Reward points: 0
    • Joined: 2012/08/13 04:51:23
    • Location: Indore (India)
    • Status: offline
    Re: Fortigate Firewall Rest API 2019/08/11 08:45:15 (permalink)
    0
    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'
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 5.5