Appearance
Read
Get by ID
Returns a single record by its primary key.
http
GET /api/{entity}/{id}Example:
http
GET /api/product/AB-001Response (200 OK):
json
{
"reference": "AB-001",
"name": "Headphones",
"price": 199.99,
"category": { "id": 1, "name": "Electronics" },
"status": "IN_STOCK"
}Returns 404 Not Found if the record does not exist.
Get Multiple by ID
Returns a list of records matching the provided IDs. Results are not paginated.
http
GET /api/{entity}?id={id1}&id={id2}Example:
http
GET /api/product?id=AB-001&id=AB-002Response (200 OK):
json
[
{ "reference": "AB-001", "name": "Headphones", ... },
{ "reference": "AB-002", "name": "Speakers", ... }
]List All (no pagination)
Returns all records as a page with no size limit. Use this only for small datasets; for large ones, prefer the Query endpoint with explicit pagination.
http
GET /api/{entity}Response (200 OK) — a Spring Page containing all records:
json
{
"content": [ ... ],
"totalElements": 1500,
"totalPages": 1,
"size": 1500,
"number": 0
}WARNING
This endpoint fetches all records in a single query with no upper bound. For production use with large tables, always use explicit pagination via ?page= or the Query endpoint.
List with Pagination and Sorting
Use the page query parameter to trigger paginated mode.
http
GET /api/{entity}?page={page}&size={size}&sort={field};{direction}| Parameter | Required | Default | Description |
|---|---|---|---|
page | Yes (to enable pagination) | — | Page index, 0-based |
size | No | 10 | Number of records per page (min: 1) |
sort | No | Entity default sort | Sort expression: field;asc or field;desc. Can be repeated for multi-field sorting. |
Example:
http
GET /api/product?page=0&size=20&sort=name;asc&sort=price;descResponse (200 OK):
json
{
"content": [ ... ],
"totalElements": 150,
"totalPages": 8,
"size": 20,
"number": 0
}Sort format
The sort separator is a semicolon (;), not a comma. Example: sort=name;asc, sort=price;desc.
Default Sort
When no sort parameter is provided, the entity's default sorting expression is used (configured via @SortingExpression annotation), falling back to the entity ID.
Access Control
Requires the read authority for the entity. See RBAC.