Audit Log

You need View Audit Log permission to view audit logs.

Audit Logs
- Audit Logs Manage
GET global/auditLogs
GET global/auditLogs/{id}
POST global/auditLogs
Model
Audit Log JSON Format

Audit Log is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the audit log.
moduleId string Module which the action belongs to.
actionSummary string Summary of the action.
actionDetails string Details of the action.
agentId guid Id of the agent who did the action.
createTime datetime Audit log create time.
actionTypeId integer Id of the action type.
agent agent Reference to Agent.
actionType actionType Reference to Action Type.
module module Reference to Module.
Endpoint
Get the list of Audit Logs

GET global/auditLogs

Parameters:
Name Type In Required Description
anyAgent guid query no Id of the agent.
keywords string query no The keywords associated with the action.
actionTime DateTime query no The created time of the action.
actionType int query no Action types for different applications. Call this interface 'Get the list of ActionTypes' to get action types.
module string query no The module of the action. Call this interface 'Get the list of Modules' to get modules.
include string query no Allowed values are "agent", "actionType", "module".
Response:

An array of   Audit Log

Example

Sample Request:

curl https://api15.comm100.io/v4/global/auditLogs \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"auditLogs":[{"id":"12b65ac3-6f74-42df-b7e0-79c912255081","moduleId":"Global","actionSummary":"Update Restricted Words : 10000 (ID: 10000) ","actionDetails":"[{\"fieldName\":\"avatar\",\"newValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=0a81b7ef4afeecb251b27c3e45b4ba5a\",\"oldValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=920b345dfe5d42cf0441305e5a1191dc\"},{\"fieldName\":\"systemAvatarId\",\"newValue\":\"1768a098-f138-eb11-ac9f-18c04d023ea9\",\"oldValue\":\"2d83d4fd-3114-eb11-80fc-00155d081d0b\"}]","agentId":"07975907-ee24-4722-b7df-711a2a4f5dba","createTime":"2021-04-16T10:05:38.7593288Z","actionTypeId":"1","agent":{"id":"a9db5819-7f7e-49dd-9b1b-45378bfa47c1","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/a9db5819-7f7e-49dd-9b1b-45378bfa47c1/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]},"actionType":{"id":1,"moduleId":"Global","name":"Agent Role Management"},"module":{"id":"","name":"LiveChat","description":"This is LiveChat.","order":0}}],"nextPage":null,"previousPage":null,"total":1}
Get a single Audit Log

GET global/auditLogs/{id}

Parameters:
Name Type In Required Description
include string query no Allowed values are "agent", "actionType", "module".
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/auditLogs/12b65ac3-6f74-42df-b7e0-79c912255081 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"12b65ac3-6f74-42df-b7e0-79c912255081","moduleId":"Global","actionSummary":"Update Restricted Words : 10000 (ID: 10000) ","actionDetails":"[{\"fieldName\":\"avatar\",\"newValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=0a81b7ef4afeecb251b27c3e45b4ba5a\",\"oldValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=920b345dfe5d42cf0441305e5a1191dc\"},{\"fieldName\":\"systemAvatarId\",\"newValue\":\"1768a098-f138-eb11-ac9f-18c04d023ea9\",\"oldValue\":\"2d83d4fd-3114-eb11-80fc-00155d081d0b\"}]","agentId":"07975907-ee24-4722-b7df-711a2a4f5dba","createTime":"2021-04-16T10:05:38.7593288Z","actionTypeId":"1","agent":{"id":"a9db5819-7f7e-49dd-9b1b-45378bfa47c1","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/a9db5819-7f7e-49dd-9b1b-45378bfa47c1/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]},"actionType":{"id":1,"moduleId":"Global","name":"Agent Role Management"},"module":{"id":"","name":"LiveChat","description":"This is LiveChat.","order":0}}
Create a new Audit Log

POST global/auditLogs

Parameters:
Name Type In Required Description
moduleId string body no Module which the action belongs to.
actionSummary string body no Summary of the action.
actionDetails string body no Details of the action.
agentId guid body no Id of the agent who did the action.
createTime datetime body no Audit log create time.
actionTypeId integer body no Id of the action type.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/auditLogs \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"moduleId":"Global","actionSummary":"Update Restricted Words : 10000 (ID: 10000) ","actionDetails":"[{\"fieldName\":\"avatar\",\"newValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=0a81b7ef4afeecb251b27c3e45b4ba5a\",\"oldValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=920b345dfe5d42cf0441305e5a1191dc\"},{\"fieldName\":\"systemAvatarId\",\"newValue\":\"1768a098-f138-eb11-ac9f-18c04d023ea9\",\"oldValue\":\"2d83d4fd-3114-eb11-80fc-00155d081d0b\"}]","agentId":"07975907-ee24-4722-b7df-711a2a4f5dba","createTime":"2021-04-16T10:05:38.7593288Z","actionTypeId":"1"}'

Response:

 HTTP/1.1 201 Created

{"id":"12b65ac3-6f74-42df-b7e0-79c912255081","moduleId":"Global","actionSummary":"Update Restricted Words : 10000 (ID: 10000) ","actionDetails":"[{\"fieldName\":\"avatar\",\"newValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=0a81b7ef4afeecb251b27c3e45b4ba5a\",\"oldValue\":\"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/avatar?SiteId=10000&version=920b345dfe5d42cf0441305e5a1191dc\"},{\"fieldName\":\"systemAvatarId\",\"newValue\":\"1768a098-f138-eb11-ac9f-18c04d023ea9\",\"oldValue\":\"2d83d4fd-3114-eb11-80fc-00155d081d0b\"}]","agentId":"07975907-ee24-4722-b7df-711a2a4f5dba","createTime":"2021-04-16T10:05:38.7593288Z","actionTypeId":"1","agent":{"id":"a9db5819-7f7e-49dd-9b1b-45378bfa47c1","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/a9db5819-7f7e-49dd-9b1b-45378bfa47c1/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]},"actionType":{"id":1,"moduleId":"Global","name":"Agent Role Management"},"module":{"id":"","name":"LiveChat","description":"This is LiveChat.","order":0}}