api

Reference:
https://docs.fortinet.com/document/fortigate/7.6.5/administration-guide/940602/using-apis

Access to the Fortinet Developer Network requires sponsorship from FortiNet employees. Most likely you will need to be a FortiNet customer and request sponsorship from your sales rep.

You can pull the API schema from FortiGates (and possibly other appliances). You will only have access to the API schema for that particular device and firmware version.

After logging into the device you can download the cmdb and monitor api schemas with this paths:
/api/v2/monitor/?action=schema
/api/v2/cmdb/?action=schema

So if your fortigates URI https://myfortigate, authenticate with the device and then open https://myfortigate/api/v2/cmdb/?action=schema

The cmdb API is for accessing configurations.
The monitor API is for accessing data, logs, status.

If you plan to use an API key in the URI, you may need to enable rest-api-key-url-query.

config system global
    set rest-api-key-url-query enable
end

That allows you to query the device with the access token in the URI like this:

https://<FortiGate_IP_or_Hostname>/api/v2/monitor/?access_token=

Otherwise, you’ll need to add the API token to the header of the GET request like this.

curl --insecure \
-H "Accept: application/json" \
-H "Authorization: Bearer <API-TOKEN>" https://myfortigate/api/v2/cmdb/firewall/address