Skip to main content

Global search

The search endpoint performs a full-text search across objects in a tenant. It uses the tenant's generalSearchType 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
typesNoComma-separated list of plural REST type names to search within (e.g. persons,companies). Overrides the tenant's generalSearchType for this request.

When types is omitted, the endpoint falls back to the tenant's generalSearchType configuration. If neither types is provided nor generalSearchType 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": {
"people": [
{ "name": "Alice Johnson", "_types": ["person"], "_links": { "self": { "href": "/data/{tenant}/people/{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 types and a single object may satisfy more than one (for example both person and shareholder). Two consequences:

  • The _embedded array is keyed under one plural type name, but its rows are heterogeneous. Do not treat that key as the type of every row — read each row's own _types array, and address each object under any of its plural type names (or under /data/{tenant}/items/{id}, its single basic type).
  • 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 types parameter and no generalSearchType 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&types=persons,companies