Skip to content

API Overview

Every @SquizyEntity automatically exposes a full REST API under /api/{entity-name}. The entity name is the lower-cased JPA entity name.

Base URL

/api/{entity}

For an entity class named Product, all endpoints are under /api/product.

Endpoint Reference

MethodPathDescription
GET/api/{entity}List all records (no pagination)
GET/api/{entity}?page=0&size=10&sort=field;ascList records with pagination and sort
GET/api/{entity}/{id}Get a single record by ID
GET/api/{entity}?id=1&id=2Get multiple records by ID
POST/api/{entity}Create a new record
POST/api/{entity}/queryQuery with filters, sorting and pagination
PATCH/api/{entity}/{id}Update a single record (JSON Patch)
PATCH/api/{entity}Bulk update (JSON Patch)
DELETE/api/{entity}/{id}Delete a single record
DELETE/api/{entity}?id=1&id=2Delete multiple records
POST/api/{entity}/exportExport to CSV
GET/api/{entity}/{id}/revisionsList revisions for a record
GET/api/{entity}/{id}/revisions/{rev}Get entity state at a specific revision
GET/api/{entity}/revisions/summaryList all revisions for the entity type
GET/api/{entity}/{id}/properties/{prop}Get a property value
POST/api/{entity}/properties/{prop}/queryQuery property values (dropdown options)

Paginated Response Format

Endpoints that return paginated results share a common response shape (Spring Page):

json
{
  "content": [ /* array of entities */ ],
  "totalElements": 42,
  "totalPages": 5,
  "size": 10,
  "number": 0
}
FieldDescription
contentThe entities on the current page
totalElementsTotal number of matching records
totalPagesTotal number of pages
sizePage size used
numberCurrent page index (0-based)