My last post was about how to backup your FortiGate via the API which is very handy. To add to that software version 7.0.4 comes the ability to log API events. Probably a good idea if you are using the API.
access the CLI of your FortiGate, via whatever method you prefer. For little snippets like this i prefer to use the GUI CLI Console.
Now its just a case of enabling the logging level you need.
config log setting
set rest-api-set enable
set rest-api-get enable
set rest-api-post enable
set rest-api-put enable
set rest-api-delete enable
And the system will start logging the events. No reboot required.
These events can be viewed from System Events, just make sure you choose the right context with the drop down menu.
You can find out more on this here.