FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Ted
Staff
Staff
Article Id 344457
Description

This article describes an alternative of the API URL for /api/v2/cmdb/system/status. When an API client sends a request with a URL /api/v2/cmdb/system/status to a FortiGate running on v7.4.4, it returns API error 404 indicating the API server cannot find the requested resource for the API URL.

 

root@ted:/home/ted/Desktop# curl -k -X GET "https://<FGT IP>:443/api/v2/cmdb/system/status?global=1&access_token=<api token>" -H "accept: application/json"
{

"status": "error",
"http_status": 404, <----- Indicates the API server cannot find the requested resource for the API URL.
"path": "system",
"name": "status",
"serial": "FGVM02",
"version": "v7.4.4",
"build": 2662,
"http_method": "GET"

}

Scope FortiGate v7.4.4
Solution

It is possible to replace the depreciated API URL /api/v2/cmdb/system/status with a new URL /api/v2/monitor/system/status.

 

root@ted:/home/ted/Desktop# curl -k -X GET "https://<FGT IP>:443/api/v2/monitor/system/status?global=1&access_token=<api token>" -H "accept: application/json"
{

"http_method":"GET",
"results":{

"model_name":"FortiGate",
"model_number":"VM64",
"model":"FGVM64",
"hostname":"FGVM02",
"log_disk_status":"available"

},
"vdom":"root", <----- Returned root VDOM's status information only.
"path":"system",
"name":"status",
"action":"",
"status":"success",
"serial":"FGVM02",
"version":"v7.4.4",
"build":2662

 

Contributors