REST API
FortiNAC's REST API provides a powerful yet standardized method for other systems to interact with FortiNAC, leverage data from the FortiNAC database and add or remove users and hosts. Each resource in the REST API is identified by a named URL, and is accessed using standard HTTP methods (HEAD, GET, POST, PATCH, DELETE). Using REST API you can:
- Retrieve detailed information about an element such as a Host or a User.
- Query the database for a list of items.
- Update User or Host records.
- Block a host's access to the network or unblock access to the network.
Request parameters and response values are case sensitive. |
Overview
- Requires firmware version 3.x or higher (CentOS).
- Connect to the FortiNAC Server or Control Server using a browser.
- Authenticate using an administrator account. This should be set up in advance through the administrator Interface. See Administrators.
- Currently only XML is supported.
- Review the list of API URLs that can be accessed. See API URLs.
Authentication
-
To use the API you must connect to the FortiNAC Server or Control Server and authenticate. Open a browser and type the following:
https://<servername>:8443/api
Example:
https://qa228:8443/api
- A warning is displayed indicating that the site's security certificate is not trusted. This is because a self-signed certificate is being used. Click Proceed anyway to continue.
- An authentication dialog is displayed. Enter the user name and password for the Admin you configured under administrators and click OK to continue.
-
The service document is displayed. You are now authenticated and connected to the FortiNAC REST API. From here you can do queries.
To add or delete record you must use an API tool, such as RESTClient.