FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
shafiq23
Staff
Staff
Article Id 257475
Description This article describes how to use Postman to restore Fortiweb configuration through REST API
Scope FortiWeb 6.3 and later.
Solution

FortiWeb offers a RESTful API that follows the principles of Representational State Transfer. This API allows users to access and modify FortiWeb application settings.

By utilizing the RESTful API, users can seamlessly integrate FortiWeb with other systems and exercise control over its features.

The API uses HTTPS+ authentication to ensure secure and programmable management.

This makes it easy for users to integrate FortiWeb with other configurations.

Additionally, the FortiWeb RESTful API enables comprehensive management of all FortiWeb features.

 

Restoring the FortiWeb configuration can be achieved by sending an API request via its REST API. For this demonstration, we will use Postman to send the API call to the FortiWeb REST API.

 

Steps to be performed in Postman.

1) API URL:

https://<FWB-IP>/api/v2.0/system/maintenance.restoreconfiguration

 

2) Request Method : POST.

 

3) Authorization header:
- Encode string with BASE64 and use it as Authorization token
- {“username”:”admin”,”password”:“fortinet”,”vdom”:”root”}

 

4) HTTP body(form-data):

Key Value
encryption "0" - backup file not encrypted
"1" - backup file encrypted
password string
file file upload configuration backup file

 

Steps to perform in Postman:

1) Open Postman.
2) Create a new request.
3) Select the POST method and define the API URL.
4) Define the Authorization header with the encoded token.

 

Authorization header.PNG

 

5) Define request body:


Body 2.png

 

Body 3.png

 

6) Select Send to post the API call.

 

7) Successful configuration restores response would look as follows.

 

Successful restore.PNG

 

Steps to verify in FortiWeb:

1) Navigate to Log&Report -> Log Access -> Event.
*FortiWeb registers the configuration restore event and FortiWeb reboots upon configuration restore.

 

FWB event log.png

 

For more information, refer to FortiWeb RESTful API Reference:
https://fndn.fortinet.net/index.php?/fortiapi/939-fortiweb/

Contributors