Introduction
LILT Translate stores audit logs for all actions performed throughout the platform. The audit logs can be queried by calling the /activities endpoint. The logs are stored and returned as JSON blobs. Users can pass request parameters in to query logs based on certain criteria.Querying Audit Logs
Path:
GET /activitiesCODE
Description:
Fetches audit logs related to your organization/team. Example curl command:CODE
Request Parameters:
Enlarges the table by opening it in a full screen dialogOpenParameter | Description | Example Value | Type |
---|---|---|---|
organizationId | Your organization id | 274 | Integer (Required) |
from | A date and time in ISO8601 format. | 2021-06-05T00:45:42Z | String (Optional) |
to | A date and time in ISO8601 format. | 2021-06-05T00:45:42Z | String (Optional) |
actionType | One of DATABASE_ACCESS_EVENT, API_CALL_EVENT, LOGIN_EVENT | API_REQUEST | String (Optional) |
userId | The user id you want to query | 2344 | Integer (Required) |
userName | The username of the user | testuser | String (Optional) |
resourceType | The type of the resource being accessed (i.e. MEMORY, DOCUMENT, JOB, etc.). | MEMORY | String (Optional) |
requestResult | One of ATTEMPT or SUCCESS | ATTEMPT | String (Optional) |
correlationId | A UUID generated for a specific request. | String (Optional) |
Response:
The audit log response is a single JSON object with one field, containing an array with multiple log records. The base schema has the following fields return, irrespective of which action type is requested. Enlarges the table by opening it in a full screen dialogOpenField | Description | Type |
---|---|---|
auditLogs | An array of JSON blobs containing each audit log. Depending on the actionType, they will have different fields. | Array |
id | Unique identifier for the audit log | Long |
timestamp | UTC date in ISO 8601 format | String |
userName | string identifier for the user, usually an email | String |
userId | unique identifier for the user | Integer |
teamId | unique identifier for the team | Integer |
eventType | one of “LOGIN_EVENT”, “API_CALL_EVENT”, “DATABASE_ACCESS_EVENT” | String |
requestResult | enum of either ATTEMPT, SUCCESS | String |
correlationId | UUID of the request | String |
Response Types
Response types are based on theactionType
submitted within the request parameter. The available actionType values are API_CALL_EVENT, LOGIN_EVENT, and DATABASE_ACCESS_EVENT.
DATABASE_ACCESS_EVENT log:
Enlarges the table by opening it in a full screen dialogOpen
Field | Description | Type |
---|---|---|
resourceType | The type of resource being accessed. | String |
resourceId | The id of the resource being accessed. | Integer |
action | CREATE, READ, UPDATE, or DELETE | String |
queryArguments | Parameters being changed in the resource if it is a CREATE or UPDATE event. | String |
serviceSource | The name of the service generating the event. | String |
Field | Description | Type |
---|---|---|
urlSlug | The url being requested. | String |
httpMethod | The http method of the request | String |
requestHeaders | The request headers. | String |
queryArguments | The request body. | String |
statusCode | The status code of the response. | Integer |
endpoint | Enum with human readable name for what the endpoint does | String |
Field | Description | Type |
---|---|---|
loginType | enum of either “LOGIN” or “LOGOUT” | String |
JSON