Resource: log
This API call can be used to read out the log entries. In enterprise this is the view “Extras >> Log”.
Querying for column field
is not possible. As with other read calls, restrictions can be made via the filter
parameter.
Parameters:
listlimit
INTEGER. MANDATORY. Maximum: 500.listoffset
INTEGER. Offset of the list, that means from which data record onwards the list should be output. Note that the query can be very slow if the offset value is large. In this case and if the Id is known, the filter parameter should be used.module
STRING. Possible values:user
,customer
,address
,estate
,agentslog
,contact person
,file
,interested
,relation
,relations
,region
,owner
,matching
,search criteria
,offer
,project
,task
,addressAssigment
,estateAssigment
,userAssignment
,news
,intranet
,calendar
,cms
,smartSite
,emailAdministration
,arbeitszeiterfassung
,accessControl
,addressCsvExportSettings
,portal
,marketingBox
,portalAutoResponse
,portalAutoFullTransfer_Modul
,fakturaArticleAdministration
,fakturaBookings
,templateManagement
,emailPostOfficeBoxEncryption
,pdfTemplates
,cancelationBasicSettings
,cancelationGroupSettings
,domainAdministration
user
INTEGER. User ID for the user whose log is to be queried. Withoutuser
, the entries of all users are counted.action
STRING. Action of the queried log entries. Withoutaction
, the entries of all actions are counted. Possible values:splitBooking
,extendBooking
,cancelBooking
,deleteBooking
,edit
,link
,unlink
,export
,delete
,add
,duplicate
,cancelation
,massUpdateRights
,datevSync
filter
OBJECT. For the filterdateTime
can be specified to limit the time period of the log entries. For the query of time periods use the operatorBETWEEN
. Some operators do not give meaningful results. See example below for usage.You can also filter by the columns of the logging table. The possible values are:
action
,module
,userNr:user.Nr
(user),dateTime
,resourcePk
(origin data-record),resourceTable
(origin table),targetPk
(destination data-record),targetTable
(destination table).Key: field, value: array of objects with filter expressions in the format
"dateTime": [{"op": "BETWEEN", "val": ["2010-01-01 00:00:00","2022-04-01 15:00:00"]}]
. Withop
you specify the operator. Possible values forop
are the following SQL operators:is or =, >, <, >=, <=, != or <>, between, like, not like, in, not in
For the operator
like
the value % can be specified as a placeholder.With
val
you specify the value which should be applied to the filtering. The individual filter expressions are linked with the AND operation.
Example
{ "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read", "resourceid": "", "identifier": "", "resourcetype": "log", "parameters": { "listlimit": 100, "module": "address", "user": 19, "action": "edit", "filter": { "dateTime": [ { "op": "BETWEEN", "val": [ "2021-01-01 00:00:00", "2021-02-01 00:00:00" ] } ] } } }
Response
{ "status": { "code": 200, "errorcode": 0, "message": "OK" }, "response": { "results": [ { "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read", "resourceid": "", "resourcetype": "log", "cacheable": false, "identifier": "", "data": { "meta": { "cntabsolute": 2 }, "records": [ { "id": 23015, "type": "Log", "elements": { "id": "23015", "action": "edit", "module": "address", "userId": "19", "dateTime": "2021-06-29 17:43:14", "resourceId": "195" } }, { "id": 23021, "type": "Log", "elements": { "id": "23021", "action": "edit", "module": "address", "userId": "19", "dateTime": "2021-06-29 17:43:14", "resourceId": "197" } } ] }, "status": { "errorcode": 0, "message": "OK" } } ] } }