GET /api/search

Description

Performs a search for various (specified) object types, based on parameters.

Parameters

items

String. Mandatory. Defines what the search looks for, and as an extension what the return value is. Allowed values: person or persons, organisation or organisations, event or events.

mode

String. Mandatory. Defines whether the search should find an exact match or a more fuzzy search. Default: exact. Allowed values: exact, partial.

query

String. Mandatory. The search term/query/string. Must be at least 3 characters.

key

String(s). Optional. Applies to person search only. Defines which keys we try to find a match for. Allowed values: mobile, phone, email, email2, firstname, lastname, fullname. Can be multiple keys in the same search: "key=email&key=fullname".

firstname

String. Optional. Applies to person search only. Search query for first name, specifically.

lastname

String. Optional. Applies to person search only. Search query for last name, specifically.

organisation_ids

List of ints. Optional. Applies to person search only. Defines which organisational units we look for persons in. Depending on user type, this may be mandatory, and security checks are performed to ensure that the user is allowed to search in all organisational units.

limit

Int. Optional. Default: 20. Maximum: 100. Limit the size of the result set.

offset

Int. Optional. Default: 0. Offset the result set, starting at this index. For batching/paging.

view

String. Optional. Accepts "simple" and "full". Controls whether to return the full object or a simple representation.

fields

String. Optional. See Field customization.

Return

Array of Person objects, Organisation objects or Event objects.

Security

Logged in user, but what the user actually can search for depends on its permissions.