Fields of the "Events" entity:
transaction_id (int) NOT NULL DEFAULT -1 - Transaction IDtransaction_timestamp (datetime) - Transaction timetimestamp (datetime) - Event timesource (json) NOT NULL - Event sourcetype (string) NOT NULL - Transaction type. See belowrequest (json) - Request body in JSON format. See format below for different event typesresponse (json) - Response body in JSON format. See format below for different event typeserror (json) - Error text in JSON formatdetails (json) - Stores record iduser_name (string) - Username of the user initiating the event.As well as the fields listed below, which will be removed soon:
schema_name (string) - request->'entity'->>'schema'entity_name (string) - request->'entity'->>'name'row_id (int) - details->'id'insertEntities - multiple entity records insertion.insertEntity - insertion of a new record.updateEntity - modification of an existing record.deleteEntity - removal of an existing record.getUserView - retrieval of view data. Event is logged in case of access absence.runAction - an error occurred during procedure execution.writeEvent - outcome of FunDB.writeEvent call from a procedure or trigger.restoreSchemas - restoration of schemas.insertEntities{
"entity":{
"name":"opportunities",
"schema":"crm"
},
"entries":[
{"subject":"678","is_deleted":false,"responsible_contact":21},
{"subject":"4567","is_deleted":false,"responsible_contact":21},
{"subject":"345","is_deleted":false,"responsible_contact":21},
{"subject":"23","is_deleted":false,"responsible_contact":21}
]
}
null
insertEntity{
"entity":{
"name":"posts",
"schema":"hrm"
},
"fields":{
"name":"Test",
"is_deleted":false
}
}
{"id":18}
In case of an error in the trigger triggered by the creation of a new record:
{
"error": "Error while running trigger base.insert_new: Return value must not be null",
"schema": "base",
"name": "insert_new",
"inner": {
"error": "exception",
"userData": null,
"message": "Return value must not be null"
},
"message": "Error while running trigger base.insert_new: Return value must not be null"
}
In case of successful record creation, the events.error field is empty.
updateEntity{
"id":68,
"entity":{
"name":"actions",
"schema":"pm"
},
"fields":{
"subject":"Test New"
}
}
{"id":68}
In case of an error in the trigger triggered by modifying a record:
{
"error": "Error while running trigger base.change_status: Return value must not be null",
"schema": "base",
"name": "change_status",
"inner": {
"error": "exception",
"userData": null,
"message": "Return value must not be null"
},
"message": "Error while running trigger base.change_status: Return value must not be null"
}
In case of successful record modification, the events.error field is empty.
deleteEntity{
"id":18,
"entity":{
"name":"posts",
"schema":"hrm"
}
}
{}
getUserViewnull
null
access_denied
runAction{
"args":{},
"action":{
"name":"test_action",
"schema":"user"
}
}
null
{
"error": "Uncaught Error: test\nJavaScript stack trace:\nat t() in actions/user/test_action.mjs:3:11",
"userData": null,
"message": "Uncaught Error: test\nJavaScript stack trace:\nat t() in actions/user/test_action.mjs:3:11"
}
writeEvent{
"details":"Trigger \"update_fields_values_before_update_storage_action\":\nevent: {\"entity\":{\"schema\":\"storage\",\"name\":\"actions\"},\"time\":\"BEFORE\",\"source\":{\"type\":\"update\",\"id\":3}}\nargs: {\"executor_secondary\":56}"
}
null
restoreSchemas{
"flags":{},
"schemas":{
"admin":{
"roles":{/*...*/},
"actions":{/*...*/},
"modules":{/*...*/},
"entities":{/*...*/},
"triggers":{/*...*/},
"userViews":{/*...*/},
"customEntities":{/*...*/},
"defaultAttributes":{/*...*/}
},
"base": {/*...*/}
}
}
{}