Agents log

Resource: agentslog

Reads all specified fields from a given agents log record. All fields listed under parameter data are valid here and are passed as elements of an array in the parameter data. A list of kind of actions and action types can be found in enterprise under “Extras >> Settings >> Administration >> Action types”. The german names are valid for the API.

Parameters:

  • data
    ARRAY. Each field is returned with the appropriate value of the record. Entries are sorted antichronologically. Following fields can be queried within the data parameter:
    Objekt_nr, Adress_nr, Aktionsart, Aktionstyp, Datum, created, Benutzer, Benutzer_nr, Datum_bearb, Kosten, Bemerkung, merkmal
  • estateid
    INTEGER. Return only entries associated with this estate record
  • addressid
    INTEGER. Return only entries associated with this address record
  • filter
    OBJECT. Key: field, value: array of objects with filter expressions in the format "Aktionsart": [{"op": "=", "val": "Email"}]. 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.

  • listlimit
    INTEGER. Maximum number of records returned in the response. Maximum: 500. Default: 20
  • listoffset
    INTEGER. Offset of the list, that means from which data record onwards the list should be output.
  • sortby
    OBJECT. Fields to sort by. The field name is used as the key, and the type of sorting as the value. Notation: {"Aktionsart": "ASC", "Aktionstyp": "DESC"}
    Possible values for sorting are ASC for ascending, DESC for descending. It is also possible to specify only field names without sort information and use sortorder together with parameters, e.g. "sortby": "Aktionsart".
  • sortorder
    STRING. Possible values: ASC or DESC. Ascending or descending. Only applicable if sortby was specified as a string without sorting information, e.g. "sortby": "Aktionsart".
  • fullmail
    BOOLEAN. If true, the associated email will be returned in the response parameter mailbody
  • tracking
    BOOLEAN. Return only entries released for object tracking

Example:

...
{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourcetype": "agentslog",
    "resourceid": "",
    "identifier": "",
    "parameters": {
        "estateid": 2507,
        "filter": {
            "Aktionsart": [
                {
                    "op": "=",
                    "val": "Email"
                }
            ]
        },
        "data": [
            "Objekt_nr",
            "Aktionsart",
            "Aktionstyp",
            "Datum",
            "Bemerkung",
            "merkmal"
        ]
    }
}
...

Response:

  • (individually)
  • mailbody
    STRING. Mail body of the associated e-mail
  • {
        "status": {
            "code": 200,
            "errorcode": 0,
            "message": "OK"
        },
        "response": {
            "results": [
                {
                    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
                    "resourceid": "",
                    "resourcetype": "agentslog",
                    "cacheable": true,
                    "identifier": "",
                    "data": {
                        "meta": {
                            "cntabsolute": 2
                        },
                        "records": [
                            {
                                "id": 67075,
                                "type": "agentslog",
                                "elements": {
                                    "Objekt_nr": [
                                        "2529"
                                    ],
                                    "Aktionsart": "Email",
                                    "Aktionstyp": "Ausgang",
                                    "Datum": "2021-02-23 12:28:30",
                                    "Bemerkung": "Vertragsunterlagen versendet",
                                    "merkmal": null
                                }
                            },
                            {
                                "id": 67035,
                                "type": "agentslog",
                                "elements": {
                                    "Objekt_nr": [
                                        "2529"
                                    ],
                                    "Aktionsart": "Email",
                                    "Aktionstyp": "Ausgang",
                                    "Datum": "2021-02-20 15:30:00",
                                    "Bemerkung": "Hallo",
                                    "merkmal": "|indMulti1780Select8196|"
                                }
                            },
                    "status": {
                        "errorcode": 0,
                        "message": "OK"
                    }
                }
            ]
        }
    }