Created on 11-26-2024 12:40 AM Edited on 11-27-2024 01:06 AM By Jean-Philippe_P
Description | This article describes how to troubleshoot errors encountered when polling FortiAnalyzer's API as a REST API user. |
Scope | FortiAnalyzer. |
Solution |
FortiAnalyzer allows the generation of API keys to be used by API users for polling purposes:
REST API users also require the configuration of trusted hosts to make API access more secure:
API users will need to make sure to poll FortiAnalyzer's API from a trusted subnet. If the subnet polled from is not trusted, it will display the following error:
{'result': [{'status': {'code': -11, 'message': 'No permission for the resource'}}], 'id': 5}
The following debug can be run to see what IP the incoming API request is coming from:
dia de app auth 8 dia de en auth api user: from=10.111.37.32 origin=(null)
To resolve this, the correct subnet needs to be included:
Once this is done, debug will show the API request being authorized:
auth api user: from=10.111.37.32 origin=(null) |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.