Audit Trail API (classic)
Follow the Audit Trail API procedure on this page only if you still need to track Experience events (Engine, Finder).
For the rest of the new integrations in Experience, you should use the NQL API export or the Data exporter for Azure Data Lake. Refer to the Exporting audit logs documentation.
Authentication
Calling the Audit Trail API requires a local user with administrator rights.
Refer to the Roles documentation for a detailed description of the permission options.
User account
To authenticate the client, the Audit Trail API supports Basic Authentication. Nexthink recommends creating a dedicated local account for that.
OAuth
You can configure the Nexthink instance to grant access to the Audit Trail API using the open standard for access delegation, OAuth. Contact Nexthink Support for more information.
Calling the Audit Trail API
User account
To retrieve the audit log files of the Nexthink instance, send a GET request using one of the following URLs:
Retrieve the audit log of the Nexthink web interface:
https://<instance_FQDN>/audit-trail/api/v1/portal/type/auditlog
Retrieve the audit log of a particular Engine (classic):
https://<instance_FQDN>/audit-trail/api/v1/engine/<Engine_Hostname>/type/auditlog
Retrieve the audit log of all Engines (classic):
https://<instance_FQDN>/audit-trail/api/v1/engines/type/auditlog
OAuth
To retrieve the audit log files of the Nexthink instance, send a GET request using one of the following URLs: Retrieve the audit log of the Nexthink web interface:
https://agora.<region>.nexthink.cloud/audit-trail/api/v1/portal/type/auditlog
Retrieve the audit log of a particular Engine (classic):
https://agora.<region>.nexthink.cloud/audit-trail/api/v1/engine/<Engine_Hostname>/type/auditlog
Retrieve the audit log of all Engines (classic):
https://agora.<region>.nexthink.cloud/audit-trail/api/v1/engines/type/auditlog
Where <region>
must match the region of your Nexthink instance, assigned to your organization during the onboarding.
When generating a token, use the following scope: service:audit-trail
.
When generating a token, use the following scope: service:audit-trail
.
Refer to the Other integrations (classic) documentation for more information.
Optional parameters
To retrieve a timeframe, use the following optional parameters:
before_date: returns all the events before the provided date or datetime. Format:
yyyy-mm-ddThh:mm:ss
(e.g.,2024-12-24
or2024-12-24T14:00:00
).elapsed_hours: returns all the events for the provided duration from now or before_date (when specified).
You can use both parameters independently.
Response of the Audit Trail API
The Audit Trail API returns the content of the audit log file in the target instance. In case of a call to retrieve the audit log of all Engines (classic), the response is the result of concatenating the audit log files of each connected Engine (classic).
Error conditions
When unsuccessful, a call to the Audit Trail API returns an error response in the form of a JSON array, along with an HTTP error code:
Error type | HTTP code | Cause |
---|---|---|
Engine error (classic) | Internal server error 500 |
|
RELATED REFERENCE
Last updated