Fortinet Document Library

Version:

Version:


Table of Contents

Download PDF
Copy Link

REST API for system level resources

FortiMail supports retrieval and modification of system level CMDB configuration settings as well as system level statistics. The API can be accessed using the following URL:

http(s)://host_ip/api/v1/resource_name/resource_id/sub_resource_name/sub_resource_id/

where:

  • resource_name: Specifies the type of resource to query (such as SysInterface), required.
  • resource_id: Unique ID of the resource as specified by resource_name (such as port1), optional. If not present, returns entire list of resources.
  • sub_resource_name: Some resources may have sub / child resources, use this to query sub resources, optional.
  • sub_resource_id: Unique ID of the sub resource as specified by sub_resource_name, optional. If not present, returns entire list of sub resources.

Examples:

  • …/api/v1/SysInterface/: Returns list of network interfaces
  • …/api/v1/SysInterface/port1/: Return details of network interface ‘port1’
  • …/api/v1/SysGlobal/: Returns details of global settings (only one instance)
  • …/api/v1/ProfSession/inbound/ ProfSessionSenderWhitelist/: Returns sender whitelist/saftlist of session profile ‘inbound’

For a full list of system level resources, refer to the Supported Resources List.

REST API for system level resources

FortiMail supports retrieval and modification of system level CMDB configuration settings as well as system level statistics. The API can be accessed using the following URL:

http(s)://host_ip/api/v1/resource_name/resource_id/sub_resource_name/sub_resource_id/

where:

  • resource_name: Specifies the type of resource to query (such as SysInterface), required.
  • resource_id: Unique ID of the resource as specified by resource_name (such as port1), optional. If not present, returns entire list of resources.
  • sub_resource_name: Some resources may have sub / child resources, use this to query sub resources, optional.
  • sub_resource_id: Unique ID of the sub resource as specified by sub_resource_name, optional. If not present, returns entire list of sub resources.

Examples:

  • …/api/v1/SysInterface/: Returns list of network interfaces
  • …/api/v1/SysInterface/port1/: Return details of network interface ‘port1’
  • …/api/v1/SysGlobal/: Returns details of global settings (only one instance)
  • …/api/v1/ProfSession/inbound/ ProfSessionSenderWhitelist/: Returns sender whitelist/saftlist of session profile ‘inbound’

For a full list of system level resources, refer to the Supported Resources List.