FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
rpmadathil_FTNT
Article Id 191497
Description
The FortiManager XML API enables you to retrieve information about managed devices, execute scripts to modify device configurations, and install the modified configurations on the devices.

In this example SoapUI is used. (http://www.soapui.org/)

Solution
1. Enable Web Services on an interface:

- Go to System Settings > Network > Interface
- Select the Edit icon for the interface that you want to use.
- In the Administrative Access section, select Web Service.
- Select OK.

2. Import the FortiManager WSDL on to the soapUI.

Once enabled, the XML API is self-documenting.  You can view the WSDL definitions by browsing to https://<fortimanager_ip>:8080/ or by downloading it under the System Settings > Advanced > Advanced Settings view in the FortiManager GUI.

Download the WSDL file from System Settings > Advanced > Advanced Settings > Download WSDL.


3. Create a script under Createscript tab.

- Specify the user name, adom, name for the script, and type as CLI.
- Specify the commands in which you need to execute.
- Select RUN.
- In this example, the device has VDOM enabled.
- If there is no VDOM, specify the command only. ie "get router info routing-table database"

Refer the following screenshot:
rpmadathil_FD35072_tn_rishi_1.jpg


4. Run the script.

- Specify the user name, ADOM, name for the script, and type as CLI.
- Mention the device id of the specific device, serial no.
- Select RUN.

Refer the following screenshot:
rpmadathil_FD35072_tn_rishi_2.jpg

5. Identify the logid using the "getScriptLogSummary"

- Refer the following screenshot.
- Run the script; identify the "logid" from the script output.

rpmadathil_FD35072_tn_rishi_3.jpg

6. Get the script output using "GetScriptLog".

- Specify the device id, serial no.
- Log id (from step 4)
- Scriptname (from step1)
- Refer the following screenshot.
- Once you run this command, you will be able to find the routing-table database.

rpmadathil_FD35072_tn_rishi_4.jpg
(Full size versions of the 4 screenshots are included as attachments to this article.)

Contributors