The search aspect of Ditto can be accessed via an HTTP API.
filter parameter is omitted, the result contains all
Things the authenticated user is
allowed to read.
namespaces parameter can be added to search only in the given namespaces.
In order to define for which
Things to search, the
filter query parameter has to be added.
In order to change the sorting and limit the result (also to do paging), the
option parameter has to be added.
Default values of each option is documented here.
GET .../search/things?filter=eq(attributes/location,"living-room")&option=sort(+thingId),limit(0,5)&namespaces=org .eclipse.ditto,foo.bar
Another Complex example with the
The HTTP search API can also profit from the partial request concept
of the API:
Additionally to a
fields parameter may be specified in order to select which data
of the result set to retrieve.
Example which only returns
thingId and the
manufacturer attribute of the found Things:
namespaces parameter, the result can be limited to the given namespaces.
Example which only returns Things with the given namespaces prefix:
Search counts can be made against this endpoint: