# Audit logging
All API requests must be authenticated as described in the Getting Started section.
Use this endpoint to retrieve audit logs, which allow you to monitor and prevent suspicious employee activity.
GET /resources/auditTrailEvents
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
subjectName | String | No | Account name for which events will be retrieved. If not specified, events will be retrieved for all accounts. |
activity | String | No | If specified, only this type of events will be included in the response. |
from | String | No | Start time for events (format yyyy-MM-dd HH:mm:ss). If not specified, events from yesterday will be considered. |
to | String | No | End time for events (format yyyy-MM-dd HH:mm:ss). If not specified, events up to the current time will be considered. |
limit | Integer | No | Maximum number of events in one response. Cannot exceed 20000, default is 10. |
offset | Integer | No | Skips the specified number of events in the returned list. Default is 0. |
Response
HTTP status 200 confirms API availability. The response body contains a JSON payload with the list of events.
Events are always sorted by the ts field in descending order (newest to oldest). The maximum number of events per request is 20,000.
Example
Copy
curl -X GET \
'https://api.idngo.kz/resources/auditTrailEvents'
{
"items": [
{
"ts": "2022-10-06 08:23:28.715",
"clientId": "sample_key",
"activity": "subject:loggedIn:dashboard:success",
"subjectName": "subject@name.com",
"ip": "5.64.19.63",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.34",
"xClientId": "dashboard",
"correlationId": "req-7ae0a875-1d06-1234-b266-8fe2a24f22fa",
"applicantId": "",
"externalUserId": "",
"imageId": "",
"description": ""
},
{
"ts": "2022-10-05 06:37:58.858",
"clientId": "sample_key",
"activity": "subject:loaded:applicantList",
"subjectName": "subject@name.com",
"ip": "46.109.67.83",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/105.0.0.0 Safari/537.36",
"xClientId": "dashboard",
"correlationId": "req-afea91b7-21e7-1234-98fb-ebe4d2867df6",
"applicantId": "",
"externalUserId": "",
"imageId": "",
"description": "cnt=10"
}
],
"totalItems": 2
}
Event fields
| Name | Type | Required | Description |
|---|---|---|---|
ts | String | Yes | Event date/time. |
clientId | String | Yes | Unique identifier of your company in our system. |
activity | String | Yes | Type of event. |
subjectName | String | Yes | Account name for which events are retrieved. |
ip | String | Yes | IP address from which the event was recorded. |
userAgent | String | No | Device from which the event was recorded. |
xClientId | String | No | Event source: API / dashboard / SDK. |
correlationId | String | Yes | Unique identifier of the event on our side. |
applicantId | String | No | Unique identifier of the applicant in our system. |
externalUserId | String | No | External applicant identifier — the unique identifier of the user in your system. |
imageId | String | No | Image identifier. |
description | String | No | Additional information. |
Event types:
| Name | Description |
|---|---|
subject:loggedIn:dashboard:success | Successful login to the system. |
subject:loggedIn:dashboard:failure | Login failure. |
subject:loggedOut:dashboard | Logout from the system. |
subject:loaded:applicant | Loading applicant information. |
subject:loaded:applicantList | Loading the list of applicants. |
subject:exported:applicantCsvList | Exporting the list of applicants in .CSV format. |
subject:downloaded:docImage | Downloading a user document. |
subject:changed:applicant | Modification of applicant data. |