Skip to main content
FortiZiq
Staff
Staff
March 24, 2026

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:

 

{ 	"method": "exec", 	"params": [ 		{ 			"data": { 				"message": "{{message}}" 			}, 			"url": "/sys/reboot" 		} 	], 	"session": "{{session_id}}" 	"id": 1 }

 

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:

 

{ 	"cid": 12, 	"id": 1, 	"result": { 		"status": { 			"code": 0, 			"message": "OK" 		} 	} }

 

The following image shows the custom message from the Event Logs that can be seen after FortiManager has successfully rebooted:

 

1. message.png

 

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

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT