FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
kmak
Staff
Staff
Article Id 408942
Description This article describes how  to troubleshoot FortiWeb ML (Machine-Learning) based API Protection not collecting samples for Server Policy Domains.
Scope FortiWeb v7.4.X or later, FortiWeb Server Policy created with Machine Learning API Protection.
Solution

FortiWeb ML (Machine-Learning) Based API Protection supports JSON request body.

It is possible to troubleshoot using debug command lines if FortiWeb is not collecting any API path samples for the ML-based API Protection.

 

  1. Make sure the Server Policy has been created for the ML-Based API Protection policy.

 

kmak_0-1756690767869.jpeg

 

  1. Check out the ML-Based API Protection page to view the domain overview and status.

 

kmak_1-1756690767872.jpeg

 

  1. Run the commands below in SSH shell access to start debugging the Machine-Learning Based API Protection module:

 

diagnose debug reset
diagnose system redis status
diagnose debug flow filter module-detail machine-learning-api 7
diagnose debug flow filter flow-detail 0
diagnose debug flow trace start
diagnose debug enable

 

  1. A few samples of the API URL learning status can be referred to as below. a. URL request content type is not JSON type, not added to learning path.

 

kmak_2-1756690767886.jpeg

 

HTTP Return code is not 200 or 302. In the sample, the return code is 404, not added to the learning path.

 

kmak_3-1756690767901.jpeg

 

URL content type is JSON, and the return code is '200 OK', URL added to learning path:

 

kmak_4-1756690767913.jpeg

 

  1. Check out the ML-Based API Protection page again for the latest domain overview and status.

 

kmak_5-1756690767916.jpeg

 

  1. There will be a page to check the ML-Based API Protection domain overview, the API URL path list, view the URL in Tree View or API View, and the Event log of the domain’s ML-Based API Protection.
  • Overview:
kmak_6-1756690767918.jpeg

 

  • API URL Path list:

 

kmak_7-1756690767919.jpeg

 

  • API URL Path in Tree View:

 

kmak_8-1756690767920.jpeg

 

  • Event Logs of the domain ML-Based API Protection:

 

kmak_9-1756690767922.jpeg

 

Related document:

Configuring Machine Learning Based API Protection 
Contributors