Audit
On this page
Operations on audit resources. 5 endpoints, each relative to https://api.nxgen.cloud/api/v1 and authenticated as described under Authentication.
POST /log/audit
Add new audit record. In general all CRUD APIs captures the user actions in audit log when the API is fuccessfully executed. This AUDIT POST API is used to record user interaction which is not possible to record through other API calls.
Request body
Audit filtering and sorting
{
"action": "string",
"category": "string",
"mqttPush": "boolean",
"payload": {
"sourceEntityLevel": "sensor | device | site | account",
"sourceEntityId": "string"
},
"deltaPayload": "string",
"source": "string",
"subCategory": "string",
"userAction": "string",
"actionStatus": "string",
"actionTime": "number",
"workflowId": "string",
"workflowName": "string",
"userName": "string"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"data": "Audit added successfully"
}GET /log/audit/eventlist/workflowid/{id}
Get list of events associated with a workflow.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Work flow id |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
400 | Invalid input | |
403 | Forbidden |
Example 200 response:
{
"data": {
"errorCode": 0,
"errorMessage": "if errorCode above is a negative number then this errorMessage field will give more details.",
"message": [
"62cba820173001197cf10420",
"62cbac84a520010f074a4403"
]
}
}Example 400 response:
{
"errorCode": "ERR001",
"errorDesc": "Invalid Request"
}POST /log/audit/filter
Gets audit logs with filtering, sorting and pagination. It allows hierarchical level searching. It can be filtered using specified hierarchy or it uses the logged in user hierarchy. This gives the option to get additional entity fields in the response. Also provides configuration meta data about entity.
Request body
Audit filtering and sorting
{
"filters": [
{
"columnName": "string (required)",
"type": "distinctList | date | number | StringConditionFilter (required)",
"filter": "object (required)"
}
],
"sortOrder": [
{
"columnName": "string",
"isAscending": "boolean"
}
],
"primaryColumns": [
"string"
],
"hierarchyLevel": "string",
"hierarchyId": "string",
"nPerPage": "number",
"pageNumber": "number",
"isConfigDetailRequired": "boolean",
"getConfig": "boolean",
"getChildOrParent": "boolean"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"config": {
"columns": [
{
"visibility": true,
"columnName": "commercialName",
"DisplayName": "Audit",
"isFilterable": true,
"filterType": "stringCondition",
"sticky": true,
"isRightBorder": true,
"isMandatory": true,
"isNotDraggable": true
}
],
"defaultNPerPage": 50,
"defaultFilterCondition": [],
"defaultSortingOrder": [
{
"columnName": "dateTime",
"isAscending": false
}
],
"maxVisibleColumnCount": 6,
"exportLimitNPerPage": 500
},
"dataResult": [
{
"action": "Search or Tree node click",
"actionStatus": "Success",
"category": "Video Activity Search",
"sourceEntityName": "8428 Moll Kaarst Lackierhalle",
"subCategory": "Search",
"timeStamp": 1656405046000,
"userAction": "Event search result has been fetched",
"userEmail": "admin@tenant.de",
"deltaPayload": "Import Report"
}
],
"totalRecordsCount": 3552,
"filteredBy": [],
"sortedBy": [
{
"columnName": "dateTime",
"isAscending": false
}
],
"dispatchedAll": false,
"isDefaultProjectionMutated": false,
"isDefaultFilterMutated": false,
"isDefaultSortingMutated": false
}GET /log/audit/report/workflowid/{id}/timezone/{tzone}
A PDF file with workflow details.
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Work flow id |
tzone | path | string | no | Time Zone of client application. |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
400 | Invalid input | |
403 | Forbidden |
POST /log/eventlog
Get list of eventlogs for a particular entity.
Request body
Get event logs.
{
"entityId": "string",
"startTime": "number",
"endTime": "number",
"page": "number"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
400 | Invalid input | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"data": {
"errorCode": 0,
"message": {
"eventLogs": [
{
"workFlowId": "8a81bc4c820160182151cd2e86160",
"type": "WORKFLOW",
"timestamp": 1658211586783,
"userName": "Christian John",
"status": "CLOSED",
"workflowOutcome": "alarm_false",
"message": "Verbindungsausfall V1.1",
"workflowOutcomeName": "Falsealarm"
}
],
"nextPage": 1
}
}
}Example 400 response:
{
"errorCode": "ERR001",
"errorDesc": "Invalid Request"
}Example 404 response:
{
"errorCode": "404",
"errorDesc": "Not Found"
}Thank you — your feedback goes to the team that owns this page.