FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
Khidzir_MN
Staff
Staff
Article Id 347422
Description This article describes how to get HTTP transaction information via FortiWeb Rest API.
Scope FortiWeb and FortiWeb-VM v6.3.17 or later.
Solution

FortiWeb provides HTTP Transactions' Widget at Dashboard -> Status. Fortiweb also provides option to get the HTTP transaction information via it's REST API

 

Step 1: Encode the FortiWeb administrator credential string with Base64 to use it as an Authorization token:


{"username":"admin","password":"a","vdom":"root"}

 

Example:


$ echo '{"username":"admin","password":"fortinet","vdom":"root"}' | base64
eyJ1c2VybmFtZSI6ImFkbWluIiwicGFzc3dvcmQiOiJmb3J0aW5ldCIsInZkb20iOiJyb290In0K

 

Step 2: Using curl:

 

# curl -k -X GET 'https://<FortiWeb_IP>/api/v2.0/system/status.httptransactions?time=1&policy=<Server_Policy_Name>' -H 'Authorization:<token>'

 

Example:


curl -k -X GET 'https://10.20.12.10/api/v2.0/system/status.httptransactions?time=1&policy=sp1' -H 'Authorization:eyJ1c2VybmFtZSI6ImFkbWluIiwicGFzc3dvcmQiOiJmb3J0aW5ldCIsInZkb20iOiJyb290In0K' -H 'Accept: application/json'

 

example_using_curl.png
Related documents:

Technical Tip: How to register an account on Fortinet API documentation

FortiWeb REST API documentation

Contributors