Tasks

Resource type: task

Returns a list of tasks.
You can use the parameter filter to specify the filter expression directly in the API call. Or specify a task ID as resource ID, if only one task should be read out.

Parameters:

  • data
    ARRAY of fields that you want to read. List of available fields: Eintragsdatum, von, Deadline, Prio, Aufgabe, Verantwortung, Art, Status, Betreff, Bearbeiter, Beginnt_am, Aufwand_Soll_NUM, Einheit_Aufwand_Soll, Aufwand_Zusatz_NUM, Einheit_Aufwand_Zusatz, erledigt.
  • See Create tasks for more information on the fields.
  • filter
    OBJECT. Key: field, value: array of objects with filter expressions in the format "status": [{"op": "=", "val": 1}]. 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. See also the example below.

  • listlimit
    INTEGER. Maximum number of estates in the list. Maximum: 500.
  • relatedAddressId
    INTEGER. Address IDs linked with the task. Syntax: “relatedAddressId”:1,
  • relatedEstateId
    INTEGER. Estate ID with linked with the task. Syntax: “relatedEstateId”:1,
  • relatedProjectIds
    INTEGER. Project IDs linked with the task.
  • responsibilityByGroup
    BOOLEAN. Flag, if a group is responsible for the task. Can be 0 or 1. Syntax: “responsibilityByGroup”:””
  • extendedclaim
    STRING. Mandatory for marketplace providers. Not relevant for all other users. To verify the user which uses the marketplace return the “apiClaim” parameter from the service call as “extendedclaim”. User rights are then observed by the marketplace provider API user.

Example: read out all tasks with entry date > 2018-01-01 00:00

...
{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "task",
    "parameters": {
        "data": [
            "Betreff",
            "Aufgabe"
        ],
        "relatedAddressId": 1,
        "relatedProjectIds": 1,
        "relatedEstateId": 1,
        "filter": {
            "Eintragsdatum": [
                {
                    "op": ">",
                    "val": "2019-03-01 00:00"
                }
            ]
        }
    }
}
...

Example: read out a single task via task ID

{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
    "resourceid": "451",
    "identifier": "",
    "resourcetype": "task",
    "parameters": {
        "data": [
            "Betreff",
            "Aufgabe"
        ],
        "relatedAddressId": 1,
        "relatedEstateId": 1
    }
}

Response: read out a single task via task ID

...
    "response": {
        "results": [
            {
                "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read",
                "resourceid": "451",
                "resourcetype": "task",
                "cacheable": false,
                "identifier": "",
                "data": {
                    "meta": {
                        "cntabsolute": 1
                    },
                    "records": [
                        {
                            "id": 451,
                            "type": "task",
                            "elements": {
                                "Betreff": "Besichtigungstermin Max Mustermann!!!!!",
                                "Aufgabe": "Um 11:00 am 03.10.2018 Besichtigungstermin bei Max Mustermann durchf\u00fchren.",
                                "relatedAddressId": [
                                    "247"
                                ],
                                "relatedEstateId": [
                                    "459"
                                ]
                            }
                        }
                    ]
                },
                "status": {
                    "errorcode": 0,
                    "message": "OK"
                }
            }
        ]
    }
...