Generic Resource
PEPPERI NOTIFICATION SERVICE
Actions Queue
CPI Node
TODO training
Powered By GitBook
Get List Of Audit Log Entries
supported resources : all_activities, accounts, transactions

Audit Log

    Record every activity going through the PNS
    Two main types - data & action
    'data' audit log is an atomic well defined operation of data change
    'action' audit log is recording async addon function, it is a continuous action which record an entry in its beginning and update this entry at least once at the end
    data audit log can has an action audit log as its SourceAuditLog
    Header format is the same in every audit log
    AuditInfo is different between every action audit log (see below all relevant types)
    AuditInfo is the same for all data audit logs
This API Endpoint can only be used by Admin User - any other user type will get 401 Unauthorized HTTP Status Code
All Audit Logs has the same structure as "header" and the "info" objects are unique to the specific AuditType

Example of items data changed by sync

1
{
2
"UUID" : "",
3
"CreationDateTime" : "", //of the audit log ! not the data object
4
"User" : {"InternalID" :12, "Name" :"", "Email" : ""},
5
"Type" : "data", //OR adal ( = PNSType)
6
"AddonUUID": "",
7
"Resource": "items",
8
"ActionType" : "update", // in case of "insert" no revised fields
9
"SourceActionUUID" : "",
10
"Object": {
11
"ModificationDateTime": "",
12
"InternalID": ""
13
"UUID": "7b86e560-4761-421c-a04f-2d98d01d2c3b",
14
"UpdatedFields" :
15
[
16
{
17
"FieldID" : "TSAMyCategory",
18
"OldValue" : "Nike",
19
"NewValue" : "Adidas"
20
},
21
{
22
"FieldID" : "Description",
23
"OldValue" : "Men Shoes 1",
24
"NewValue" : "Men Shoes 2"
25
},
26
...
27
]
28
}
29
}
Copied!
get
https://api.pepperi.com/v1.0
/audit_logs
Get List Audit Log Entries (response where AuditType=data)

Response where Event.Type=code_job_execution

ResultObject size limit is 215K
1
[
2
{
3
"UUID" : "",
4
"CreationDateTime" : "", //of the audit log ! not the data object
5
"ModificationDateTime" : "",
6
"AuditType" : "action",
7
"Event" : { "Type": "code_job_execution" ,"User" : {"InternalID" :12, "Name" :"", "Email" : ""}}, // future : Type :"User" and UserAction : "Submit"
8
"SourceAuditLog" : {"UUID" : "", "AuditType": "action", "EventType" : "sync" }, //e.g: Event such as Sync or Code Job
9
"Status" : { "ID": 1, "Name": "Success" }, // { "ID": 0, "Name": "Failure" }
10
"AuditInfo":
11
{
12
"JobMessageData":{
13
"CodeJobUUID" : "7daf16c1-c4b3-4096-b06a-6e03051f750f",
14
"CodeJobName" : "",
15
"CodeJobDescription": "",
16
"IsScheduled" : false/true,
17
"IsPublished" : false,
18
"MessageType" : "UserCodeJobMessage",
19
"SchemaVersion" : 1,
20
"DistributorUUID" : "79012cfd-2497-4207-9acc-fa05f8f28b01",
21
"FunctionPath" : "CodeJobFiles/79012cfd-2497-4207-9acc-fa05f8f28b01/Draft/7f7dd8c5-a298-447e-b621-8f041c22b8a0",
22
"ExecutionMemoryLevel" : 1,
23
"UserUUID" : "e9d48ad0-576b-4a8e-a8d7-8ab08e7abf44",
24
"NumberOfTry" : 1,
25
"NumberOfTries" : 1, // Maximum number of tries
26
"FunctionName" : "main",
27
"StartDateTime" : "2020-07-26T06:57:29.624Z",
28
"EndDateTime" : "2020-07-26T06:57:31.639Z",
29
"Request" : {
30
"path" : "", // Relative url path
31
"method" : "POST"/"GET",
32
"originalUrl" : "",
33
"query" : { }, // request query parameters
34
"body" : { } // request body objects
35
},
36
}
37
"ResultObject" : {}, // the object returned from the function execution
38
}
39
},
40
...
41
]
Copied!

Response where Event.Type=addon_job_execution

1
[
2
{
3
"UUID" : "",
4
"CreationDateTime" : "", //of the audit log ! not the data object
5
"ModificationDateTime" : "",
6
"AuditType" : "action",
7
"Event" : { "Type": "addon_job_execution" ,"User" : {"InternalID" :12, "Name" :"", "Email" : ""}}, // future : Type :"User" and UserAction : "Submit"
8
"SourceAuditLog" : {"UUID" : "", "AuditType": "action", "EventType" : "sync" }, //e.g: Event such as Sync or Code Job
9
"Status" : { "ID": 1, "Name": "Success" }, // { "ID": 0, "Name": "Failure" }
10
"AuditInfo":
11
{
12
"JobMessageData":{
13
"CodeJobUUID" : "7daf16c1-c4b3-4096-b06a-6e03051f750f",
14
"CodeJobName" : "",
15
"CodeJobDescription" : "",
16
"IsScheduled" : false/true,
17
"IsPublished" : false,
18
"AddonData" : { "AddonUUID" : "7daf16c1-c4b3-4096-b06a-6e03051f750f", "AddonPath":"", "AddonVersion":"" }, // AddonVersion = null in case of latest version
19
"CallbackUUID" : "7daf16c1-c4b3-4096-b06a-6e03051f750f",
20
"MessageType" : "AddonCodeJobMessage"/"AddonMessage",
21
"SchemaVersion" : 1,
22
"DistributorUUID" : "79012cfd-2497-4207-9acc-fa05f8f28b01",
23
"FunctionPath" : "Addon/Public/c2d696b7-4942-4d19-9db7-7ccbb4f5a700/Ver3/test.js",
24
"ExecutionMemoryLevel" : 1,
25
"UserUUID" : "e9d48ad0-576b-4a8e-a8d7-8ab08e7abf44",
26
"NumberOfTry" : 1,
27
"NumberOfTries" : 1, // Maximum number of tries
28
"FunctionName" : "main",
29
"StartDateTime" : "2020-07-26T06:57:29.624Z",
30
"EndDateTime" : "2020-07-26T06:57:31.639Z",
31
"Request" : {
32
"path" : "", // Relative url path
33
"method" : "POST"/"GET",
34
"originalUrl" : "",
35
"query" : { }, // request query parameters
36
"body" : { } // request body objects
37
},
38
}
39
"ResultObject" : {}, // the object returned from the function execution
40
}
41
},
42
...
43
]
Copied!

Response where Event.Type = sync

1
[
2
{
3
"UUID" : "", //syncUUI
4
"CreationDateTime" : "", //of the audit log ! not the data object
5
"ModificationDateTime" : "",
6
"AuditType" : "action",
7
"Event" : { "Type": "sync" ,"User" : {"InternalID" :12, "Name" :"", "Email" : ""}}, // future : Type :"User" and UserAction : "Submit"
8
"Status" : { "ID": 1, "Name": "Success" }, // { "ID": 0, "Name": "Failure" }
9
"AuditInfo":
10
{
11
"AddonJob" : { "UUID" : "7daf16c1-c4b3-4096-b06a-6e03051f750f" } ,
12
"StartDateTime" : "2019-07-07T12:58:13Z",
13
"EndDateTime" : "2019-07-07T12:58:13Z",
14
"LastSyncDateTime": 0,
15
"DeviceExternalID": "daltestamirpc",
16
"ClientDBUUID": "MaorTest3",
17
"CPIVersion": "16.40",
18
"TimeZoneDiff": 0,
19
"Locale": "",
20
"BrandedAppID": "",
21
"UserFullName": "",
22
"SoftwareVersion": "",
23
"SourceType": "5",
24
"DeviceModel": "",
25
"DeviceName": "",
26
"DeviceScreenSize": "",
27
"SystemName": "AMIRF-PC" "" : 2,
28
"ResultObject" : {}, // the object returned from the function execution
29
"getURL" : "CodeJobFiles/8513b815-4487-4f16-97ef-2062d8dbde34/Draft/7daf16c1-c4b3-4096-b06a-6e03051f750f",
30
"putURL" : "https://api.pepperi.com/v1.0/addons/api/{addon_name}/async/{js_file_name}/{function_name}" // the user request url
31
}
32
},
33
...
34
]
Copied!

Response where Event.Type=deployment

1
[
2
{
3
"UUID" : "",
4
"CreationDateTime" : "", //of the audit log ! not the data object
5
"ModificationDateTime" : "",
6
"AuditType" : "action",
7
"Event" : { "Type": "deployment" ,"User" : {"InternalID" :12, "Name" :"", "Email" : ""}}, // future : Type :"User" and UserAction : "Submit"
8
"Status" : { "ID": 1, "Name": "Success" }, // { "ID": 0, "Name": "Failure" }
9
"AuditInfo":
10
{
11
"Addon" : {
12
"Name": "Promotion"
13
"UUID": "7daf16c1-c4b3-4096-b06a-6e03051f750f"
14
},
15
"AddonJobExecutionUUID": "7daf16c1-c4b3-4096-b06a-6e03051f750f" // the audit of the addon script that runs in the deployment
16
"Type": "" // install/upgrade/downgrade/uninstall
17
"FromVersion": "V1",
18
"ToVerion": "V5.BETA",
19
"StartDateTime" : "2019-07-07T12:58:13Z",
20
"EndDateTime" : "2019-07-07T12:58:13Z"
21
}
22
},
23
...
24
]
Copied!

Response where Event.Type=login

1
[
2
{
3
"UUID" : "",
4
"CreationDateTime" : "", //of the audit log ! not the data object
5
"ModificationDateTime" : "",
6
"AuditType" : "action",
7
"AuditType" : "action",
8
"Event" : { "Type": "login" , "User" : {"InternalID" :12, "Name" :"", "Email" : ""}}, // future : Type :"User" and UserAction : "Submit"
9
"SourceAuditLog" : null,
10
"Status" : { "ID": 1, "Name": "Success" }, // { "ID": 0, "Name": "Failure" }
11
"AuditInfo":
12
{
13
"ActivityID" : "0HLO0I0KSPFPE:00000006",
14
"Error" : "invalid password",
15
"ClientData" : {
16
"Browser" : "chrome",
17
"PepperiVersion" : "16_00"
18
},
19
"ClientID" : "pepperi.webapp.app.sandbox.pepperi.com",
20
"AuthenticationMethod" : "pwd",
21
"IdentityProvider" : "pepperi",
22
"IsLoginByPepperiAdmin" : false
23
}
24
},
25
...
26
]
Copied!
Last modified 7mo ago