Connecting to the REST API
Container FortiOS provides a REST API to perform configuration and monitoring operations. The API provides a subset of the FortiOS API.
The API is accessible by default on port 443 at any of the container interfaces. If configured to require a token, all requests must include the API token.
For example, the following examples get the antivirus settings:
curl -H "Authorization: Bearer rkMJd3SdLhb8UFBan987CnIrmPBLfaIj" https://localhost/api/v2/cmdb/antivirus/settings
curl https://localhost/api/v2/cmdb/antivirus/settings?access_token=rkMJd3SdLhb8UFBan987CnIrmPBLfaIj
|
|
To see the available options for each object, append |
For full details on the available API actions and access, see the Container FortiOS REST API documentation on FNDN.