FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
tnesh
Staff
Staff
Article Id 282784
Description

 

This article describes how to run a proxy API call from FortiManager to a managed FortiGate to collect data.

 

Scope

 

FortiManager and FortiGate.

 

Solution

 

  1. FortiManager will send proxy API calls via url:"sys/proxy/json" to managed FortiGate API "resource": "<FortiGate API Call>"

Note:

For a complete list of FortiGate API calls, refer to Fortinet Development Network (FNDN):

 

{
     "id" : "1",
     "method": "exec",
     "params": [
         {
             "url": "sys/proxy/json",
             "data": {
                   "target": [ "device/<device-name>" ],
                   "action": "get",
                   "resource": "<FortiGate API Call>"
             }
         }
     ],
     "session" : "<session-id>"
}

 

 

  1. Below are two sample usages of proxy calls from FortiManager to a managed FortiGate:

 

  • Get FortiGate Firewall Address:

 

{
     "id" : "1",
     "method": "exec",
     "params": [
         {
             "url": "sys/proxy/json",
             "data": {
                   "target": [ "device/lab-fgt2" ],
                   "action": "get",
                   "resource": "/api/v2/cmdb/firewall/address"
             }
         }
     ],
     "session" : "{{session-id}}"
}

 

 

fmg-get-address.png

 

 

  • Get FortiGate License Info:

 

{
     "id" : "1",
     "method": "exec",
     "params": [
         {
             "url": "sys/proxy/json",
             "data": {
                   "target": [ "device/lab-fgt2" ],
                   "action": "get",
                   "resource": "/api/v2/monitor/license/status"
             }
         }
     ],
     "session" : "{{session-id}}"
}

 


fmg-get-license-status.png

 

 

Related articles: