Authentication for REST APIs
To authenticate for the REST APIs, you must generate an API key from IT Analytics Portal and then pass the key as the authentication header from Swagger for the portal for user authentication. Once authenticated, your user information is used for authorization on the portal.
If you have upgraded from 10.5 or lower versions of IT Analytics, you may see authentication error while accessing the reports, as the authentication method is changed from basic to API key. You may need to make changes in your API code/script to be able to access the reports.
To generate the API key from the portal:
- Open the user menu and click Create API Key
The portal generates and API key and prompts you to copy it to your system. This key is unique for each user and is generated only once, as a new key is generated at every attempt.
- Click Copy & Close. You need to use this key to execute the REST API.
- Save the key securely as you need to provide the API key every time you access APTARE reports using REST APIs.
Note:
If a user is inactive or removed from the LDAP, update the IT Analytics Portal manually to prevent the user from using the REST API. If not done, the user automatically becomes inactive after the configured number of days.
The API key generated using the above steps has the following properties:
User can have only one active API key at a time.
The key does not have an expiry date.
Key is displayed only once when it is generated on the portal. Hence, user must copy and save it securely.
If the key goes missing, the user can revoke the existing key from the user menu and create a new one.