API: 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 parameter | Description |
|---|---|
tenantId | The tenant identifier |
Request parameters
| Parameter | Required | Description |
|---|---|---|
q | Yes | The search query string |
types | No | Comma-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 a DataObjectPage — the same structure used by list endpoints:
{
"content": [
{
"id": "a1b2c3",
"class": "commons.person",
"name": "Alice Johnson"
}
],
"totalElements": 42,
"totalPages": 3,
"number": 0,
"size": 15
}
Error responses
| Status | Cause |
|---|---|
400 Bad Request | No types parameter and no generalSearchType configured for the tenant |
Example
Search for "johnson" across the tenant's configured search scope:
GET /data/acme/search?q=johnson
Search for "johnson" restricted to persons and companies only:
GET /data/acme/search?q=johnson&types=persons,companies