List

Description

Returns a list of audit logs gathered from the Tines tenant.

Request

HTTP Method: GET

Query Parameter Description
before Optional Only include logs created before this timestamp
after Optional Only include logs created after this timestamp
user_id Optional Only include logs from a matching user. Use the format user_id[]= to select multiple users, i.e. ?user_id[]=1&user_id[]=2.
operation_name Optional Only include logs with a specific operation name. Use the format operation_name[]= to select multiple operation names, i.e. ?operation_name[]=StoryItemsMovement&operation_name[]=StoryItemsCreation.
per_page Optional Set the number of results returned per page. Defaults to 20.
page Optional Specify the page of results to return if there are multiple pages. Defaults to page 1.
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/audit_logs \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful response will return a list of logs for every user operation executed on the database along with the associated inputs and the id of the user who triggered the operation.

Field description

Parameter Description
created_at ISO 8601 Timestamp representing creation date and time of log operation.
operation_name The name of the operation.
id Operation ID
inputs JSON Inputs passed to the operation.
outputs JSON Outputs generated by the operation.
request_ip The IP Address the operation was triggered from
request_user_agent The user agent that the operation was triggered with
tenant_id The ID of the tenant the operation was triggered on.
user_email The email of the user who triggered the operation.
user_id The ID of the user who triggered the operation.
user_name The name of the user who triggered the operation.

Sample response

{
 "audit_logs": [
   {
     "created_at": "2022-06-24T08:35:21Z",
     "operation_name": "StoryItemsMovement",
     "id": 19990840,
     "inputs": {
       "storyId": 3480,
       "inputs": {
         "actionIds": [21246],
         "diagramNoteIds": [],
         "delta": {
           "x": 61,
           "y": 0
         }
       }
     },
     "outputs": {},
     "request_ip": "127.0.0.1",
     "request_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
     "tenant_id": 1,
     "updated_at": "2022-06-24T08:35:21Z",
     "user_email": "name@example.com",
     "user_id": 622,
     "user_name": "Name Person"
   }
 ],
 "meta": {
   "current_page": "https://hq.tines.io/api/v1/audit_logs?per_page=20&page=1",
   "previous_page": null,
   "next_page": null,
   "next_page_number": null,
   "per_page": 20,
   "pages": 1,
   "count": 1
 }
},
Was this helpful?