Number of log entries

Resource: log

This API call can be used to read out the number of log entries. In enterprise this is the view “Extras >> Log”.

Currently the call only returns the number of records under “cntabsolute”, the records array is always empty. The call might be extended later. Querying for column field is not possible.

As with other read calls, restrictions can be made via the filter parameter.

Parameters:

  • listlimit
    INTEGER. MANDATORY. Must be set to 0.
  • 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. Without user, the entries of all users are counted.
  • action
    STRING. Action of the queried log entries. Without action , 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 filter dateTime can be specified to limit the time period of the log entries. For the query of time periods use the operator BETWEEN. 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"]}]. With op you specify the operator. Possible values for op 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": 0,
            "module": "address",
            "user": 17,
            "action": "edit",
            "filter": {
                "dateTime": [
                    {
                        "op": "BETWEEN",
                        "val": [
                            "2021-01-01 00:00:00",
                            "2021-02-01 00:00:00"
                        ]
                    }
                ]
            }
        }
    }

Response: The number of log entries can be found under cntabsolute

...
{
    "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": 201
                    },
                    "records": []
                },
                "status": {
                    "errorcode": 0,
                    "message": "OK"
                }
            }
        ]
    }
}
...