Fortinet black logo

REST API for system level resources

Copy Link
Copy Doc ID 8ede2956-e766-11ec-bb32-fa163e15d75b:278255
Download PDF

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 safelist/safelist 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 safelist/safelist of session profile ‘inbound’

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