Skip to main content

Global search

The search endpoint performs a full-text search across objects in a tenant. It uses the tenant's generalSearchClasses configuration as the default scope, but this can be overridden per request.

Endpoint​

GET /data/{tenantId}/search?q={query}
Path parameterDescription
tenantIdThe tenant identifier

Request parameters​

ParameterRequiredDescription
qYesThe search query string
classesNoComma-separated plural REST names of the classes to search within (e.g. persons,companies). Overrides the tenant's generalSearchClasses for this request.

When classes is omitted, the endpoint falls back to the tenant's generalSearchClasses configuration. If neither classes is provided nor generalSearchClasses is configured, the endpoint returns 400 Bad Request.

Response structure​

Returns the same HAL DataObjectPage as the list endpoints: matching objects under _embedded, navigation under _links. Each row is the full DataObject envelope.

{
"_embedded": {
"persons": [
{ "_class": "persons", "name": "Alice Johnson", "_classes": ["persons"], "_links": { "_self": { "href": "/data/{tenant}/persons/{id}" } } }
]
},
"_links": {
"self": { "href": "/data/{tenant}/search?q=johnson" },
"next": { "href": "/data/{tenant}/search?q=johnson&page=1" }
}
}

Because the platform is an object database with multiple inheritance, a search can span several classes and a single object may have more than one (for example both person and shareholder). Two consequences:

  • The _embedded array is keyed under one plural class name, but its rows are heterogeneous. Do not treat that key as the class of every row — read each row's own _class and _classes, and address each object under any of its plural class names (or under /data/{tenant}/items/{id}).
  • No total count is returned. As with all list responses, paging is cursor-style: follow the next link until it is absent.

Error responses​

StatusCause
400 Bad RequestNo classes parameter and no generalSearchClasses configured for the tenant

Example​

Search for "johnson" across the tenant's configured search scope:

GET /data/2f9c6e1a-7b34-4d58-9c21-0a5e8f1b2c3d/search?q=johnson

Search for "johnson" restricted to persons and companies only:

GET /data/2f9c6e1a-7b34-4d58-9c21-0a5e8f1b2c3d/search?q=johnson&classes=persons,companies