Technical Tip: How to reboot FortiManager via API call
| Description | This article describes how to reboot FortiManager using an API call. |
| Scope | FortiManager. |
| Solution | To reboot FortiManager via API call, an API admin account with Read-Write permission must first be created in FortiManager itself.
Depending on which admin type is created, the admin must either log in first to get the session ID or use the bearer token when sending the request. The example below will be using the session ID.
Refer to the following KB on how to get the session ID: Technical Tip: Using FortiManager/FortiAnalyzer API
Once the session ID is obtained, the admin can then perform a reboot on the FortiManager by sending an API request with the following configurations: Request type: POST. URL: https://{{fmg_ip}}/jsonrpc. Body:
In place of {{message}}, the admin can put in a custom message that can be viewed from the Event Logs.
If the request is successful, the response should look like the following:
The following image shows the custom message from the Event Logs that can be seen after FortiManager has successfully rebooted:
Troubleshooting: The following commands can be used on the FortiManager CLI to debug the API calls:
diagnose debug service httpd 255 diagnose debug service main 255 |

