Get users

Resource type: users

Action Type: Get

Returns a list of users with information about id, user name, first name and last name. With no parameters specified, a list of all users is returned, except for permanently deactivated users.

With parameter userfilter set to onlyOwn an additional response parameter NeuerTerminFuer is added, which contains the user data in an array and is used internally by the app in the appointment module.

Parameters:

  • userfilter
    STRING. User filter. Possible values:
    • ownOfficeGroupOrAll: Returns the active users of the API user’s own office group. If the API user is not assigned to an office group, all active users are returned.
    • onlyOwn: Returns only the API user’s own user record. The response also contains the additional parameter NeuerTerminFuer, if the user setting “NeuerTerminFuer” is set (see response parameter NeuerTerminFuer below).
    • byGroupId: Returns all active users of the group specified in parameter groupId. groupId is mandatory for this value. Group IDs can be retrieved via Get groups.

    Note: “Active” means that the user is not deactivated. An active user can still be locked. To identify locked or deactivated users, use the response parameter online.

  • groupId
    INTEGER. Group ID. Required if parameter userfilter is set to byGroupId. For all other values of userfilter, groupId does not need to be set.

Example:

{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "users",
    "parameters": {
        "groupId": 225,
        "userfilter": "byGroupId"
    }
}

Response:

Parameters:

  • id
    INTEGER. User ID
  • username
    STRING. User name
  • firstname
    STRING. First name
  • lastname
    STRING. Last name
  • email
    STRING. Email
  • meetingurl
    STRING. Meeting URL of the user
  • NeuerTerminFuer
    ARRAY. New appointment for. Contains the user data of the user set in the user setting “NeuerTerminFuer”, with the fields listed here. Only returned if userfilter is set to onlyOwn.
  • appointmentColor
    STRING. Appointment color of the user (Settings > User > Settings > Appointment color)
  • code
    STRING. User code (Settings > User > Basic data > User code)
  • online
    STRING. Status of the user, see values below. The values are identical to the field online in Read User.

Values of the field online:

  • offline: active user, currently not logged in
  • online: active user, currently logged in
  • gesperrt Falscheingabe Passwort: locked after incorrect password entries
  • permanent deaktiviert: permanently deactivated
  • gesperrt Benutzerverwaltung: locked in the user administration
  • gesperrt Mandantenverwaltung: locked in the client administration

The values are returned in the language of the API user. The values listed above are the German texts.

{
    "status": {
        "code": 200,
        "errorcode": 0,
        "message": "OK"
    },
    "response": {
        "results": [
            {
                "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
                "resourceid": "",
                "resourcetype": "users",
                "cacheable": true,
                "identifier": "",
                "data": {
                    "meta": {
                        "cntabsolute": null
                    },
                    "records": [
                        {
                            "id": 25,
                            "type": null,
                            "elements": {
                                "id": 25,
                                "username": "paulprobe",
                                "firstname": "Paul",
                                "lastname": "Probe",
                                "email": "paulprobe154@onoffice.de",
                                "meetingurl": "www.meetinglink3178.com",
                                "appointmentColor": "FFFF00",
                                "code": "PP",
                                "online": "online"
                            }
                        },
                        {
                            "id": 17,
                            "type": null,
                            "elements": {
                                "id": 17,
                                "username": "theotest",
                                "firstname": "Theo",
                                "lastname": "Test",
                                "email": "theotest154@onoffice.de",
                                "meetingurl": "www.meetinglink6542.com",
                                "appointmentColor": "B04F00",
                                "code": "TT",
                                "online": "gesperrt Benutzerverwaltung"
                            }
                        }
                    ]
                },
                "status": {
                    "errorcode": 0,
                    "message": "OK"
                }
            }
        ]
    }
}