Fortinet white logo
Fortinet white logo

REST API Solution Guide

Log settings (/logsettings/)

Log settings (/logsettings/)

URL: https://[server_name]/api/[api_version]/logsettings/

This endpoint is used to edit the settings for logs. This resource can be found in the FortiAuthenticator GUI under Logging > Log Config > Log Settings.

Supported fields

Field Display name Type Required Other restrictions
delete_enable Enable log auto-deletion boolean Yes Default is set to "false" if not specified.
delete_age_n Auto-delete logs older than number integer No
delete_age_mult Auo-delete logs older than multiplier integer No Default is set to "months". Either "days", "weeks", or "months".
faz_enable Enable sending logs to FortiManager/FortiAnalyzer boolean No Default is set to "false" if not specified.
faz_server IP Address or FQDN of the FortiManager/FortiAnalyzer string No Must be a valid FQDN or IPv4 address.
backup_enable Enable remote backup boolean Yes Default is set to "false" if not specified.
backup_frequency How often the configuration is backup up string If backup_enable is true Either "hourly", "daily", "weekly", or "monthly".
backup_directory Directory on the FTP server in which to store the configuration string No
backup_time Time when the configuration is going to be backed up string If backup_frequency isn't daily Default is set to "00:00:00". Must be in 24 hour time format. Accepted formats are "23:59" or "23:59:59".
backup_ftp Name of the FTP server string No Must be the name of an FTP server already known by the FortiAuthenticator.
remote_syslog_enable Enable sending logs to remote syslog servers boolean Yes Default is set to "false" if not specified.
remote_syslog_servers Names of syslog servers string No Must be names of syslog servers known by the FortiAuthenticator, separated by commas. For example, "server1,server2,server3".

Allowed methods

HTTP method Resource URI Action
GET /api/v1/logsettings/ Get log settings.
POST /api/v1/logsettings/ Set log fields.
PATCH /api/v1/logsettings/ Update the specified log settings fields.

Log settings (/logsettings/)

Log settings (/logsettings/)

URL: https://[server_name]/api/[api_version]/logsettings/

This endpoint is used to edit the settings for logs. This resource can be found in the FortiAuthenticator GUI under Logging > Log Config > Log Settings.

Supported fields

Field Display name Type Required Other restrictions
delete_enable Enable log auto-deletion boolean Yes Default is set to "false" if not specified.
delete_age_n Auto-delete logs older than number integer No
delete_age_mult Auo-delete logs older than multiplier integer No Default is set to "months". Either "days", "weeks", or "months".
faz_enable Enable sending logs to FortiManager/FortiAnalyzer boolean No Default is set to "false" if not specified.
faz_server IP Address or FQDN of the FortiManager/FortiAnalyzer string No Must be a valid FQDN or IPv4 address.
backup_enable Enable remote backup boolean Yes Default is set to "false" if not specified.
backup_frequency How often the configuration is backup up string If backup_enable is true Either "hourly", "daily", "weekly", or "monthly".
backup_directory Directory on the FTP server in which to store the configuration string No
backup_time Time when the configuration is going to be backed up string If backup_frequency isn't daily Default is set to "00:00:00". Must be in 24 hour time format. Accepted formats are "23:59" or "23:59:59".
backup_ftp Name of the FTP server string No Must be the name of an FTP server already known by the FortiAuthenticator.
remote_syslog_enable Enable sending logs to remote syslog servers boolean Yes Default is set to "false" if not specified.
remote_syslog_servers Names of syslog servers string No Must be names of syslog servers known by the FortiAuthenticator, separated by commas. For example, "server1,server2,server3".

Allowed methods

HTTP method Resource URI Action
GET /api/v1/logsettings/ Get log settings.
POST /api/v1/logsettings/ Set log fields.
PATCH /api/v1/logsettings/ Update the specified log settings fields.