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 /activities
CODE
https://lilt.com/2/activities

Description:

Fetches audit logs related to your organization/team. Example curl command:
CODE
curl -X GET https://lilt.com/2/activities?key=API_KEY&organizationId=274&from=2021-06-25T00:48:45Z

Request Parameters:

Enlarges the table by opening it in a full screen dialogOpen
ParameterDescriptionExample ValueType
organizationIdYour organization id274Integer (Required)
fromA date and time in ISO8601 format.2021-06-05T00:45:42ZString (Optional)
toA date and time in ISO8601 format.2021-06-05T00:45:42ZString (Optional)
actionTypeOne of DATABASE_ACCESS_EVENT, API_CALL_EVENT, LOGIN_EVENTAPI_REQUESTString (Optional)
userIdThe user id you want to query2344Integer (Required)
userNameThe username of the usertestuserString (Optional)
resourceTypeThe type of the resource being accessed (i.e. MEMORY, DOCUMENT, JOB, etc.).MEMORYString (Optional)
requestResultOne of ATTEMPT or SUCCESSATTEMPTString (Optional)
correlationIdA 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 dialogOpen
FieldDescriptionType
auditLogsAn array of JSON blobs containing each audit log.
Depending on the actionType, they will have different fields.
Array
idUnique identifier for the audit logLong
timestampUTC date in ISO 8601 formatString
userNamestring identifier for the user,
usually an email
String
userIdunique identifier for the userInteger
teamIdunique identifier for the teamInteger
eventTypeone of “LOGIN_EVENT”,
“API_CALL_EVENT”,
“DATABASE_ACCESS_EVENT”
String
requestResultenum of either ATTEMPT, SUCCESSString
correlationIdUUID of the requestString

Response Types

Response types are based on the actionType 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
FieldDescriptionType
resourceTypeThe type of resource being accessed.String
resourceIdThe id of the resource being accessed.Integer
actionCREATE, READ, UPDATE, or DELETEString
queryArgumentsParameters being changed in the resource
if it is a CREATE or UPDATE event.
String
serviceSourceThe name of the service generating the event.String
API_CALL_EVENT log: Enlarges the table by opening it in a full screen dialogOpen
FieldDescriptionType
urlSlugThe url being requested.String
httpMethodThe http method of the requestString
requestHeadersThe request headers.String
queryArgumentsThe request body.String
statusCodeThe status code of the response.Integer
endpointEnum with human readable
name for what the endpoint does
String
LOGIN_EVENT log: Enlarges the table by opening it in a full screen dialogOpen
FieldDescriptionType
loginTypeenum of either “LOGIN” or “LOGOUT”String
Example Response:
JSON
{
    "error": "",
    "auditLogs": [
        "{\"_id\": {\"$oid\": \"62c5dc0dd41f7023116bffb1\"}, \"resourceType\": \"FeatureFlag\", \"resourceId\": 1, \"action\": \"READ\", \"type\": \"DATABASE_ACCESS_EVENT\", \"timestamp\": \"2022-07-06T19:01:33.879Z\", \"userId\": 1, \"userName\": \"admin@lilt.com\", \"orgId\": 1, \"teamId\": 1, \"requestResult\": \"ATTEMPT\", \"correlationId\": \"89a954e2-a92f-4df9-8ce7-e20f2892882e\"}",
        "{\"_id\": {\"$oid\": \"62c5dc0ed41f7023116bffb3\"}, \"resourceType\": \"FeatureFlag\", \"resourceId\": 1, \"action\": \"READ\", \"type\": \"DATABASE_ACCESS_EVENT\", \"timestamp\": \"2022-07-06T19:01:34.386Z\", \"userId\": 1, \"userName\": \"admin@lilt.com\", \"orgId\": 1, \"teamId\": 1, \"requestResult\": \"SUCCESS\", \"correlationId\": \"89a954e2-a92f-4df9-8ce7-e20f2892882e\"}",
        "{\"_id\": {\"$oid\": \"62c5dc0ed41f7023116bffb4\"}, \"resourceType\": \"FeatureFlag\", \"resourceId\": 2, \"action\": \"READ\", \"type\": \"DATABASE_ACCESS_EVENT\", \"timestamp\": \"2022-07-06T19:01:34.386Z\", \"userId\": 1, \"userName\": \"admin@lilt.com\", \"orgId\": 1, \"teamId\": 1, \"requestResult\": \"ATTEMPT\", \"correlationId\": \"89a954e2-a92f-4df9-8ce7-e20f2892882e\"}",
}