Appearance
Books
Top-level publications in the content hierarchy. Books contain chapters and issues.
Routes
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/books | Bearer | List books |
| GET | /api/book/:id | Bearer | Get single book |
| PUT | /api/book | JWT (admin/root) | Create a book |
| POST | /api/book/:id | JWT (admin/root) | Update a book |
| PATCH | /api/book/:id | JWT (admin/root) | Partially update a book |
| DELETE | /api/book/:id | JWT (admin/root) | Delete a book (cascades to chapters and contributions) |
List Books
GET /api/books?query=<JSON>Filterable Fields
| Field | Type | Operators |
|---|---|---|
id | number | All numeric operators |
name | string | All string operators |
Example
bash
curl -G http://localhost:8080/api/books \
-H "Authorization: Bearer API_KEY" \
--data-urlencode 'query={"where":{"name":{"$like":"%report%"}},"sort":"name","limit":10}'Get Single Book
GET /api/book/:idReturns the book object with its rights assignments.
Create Book (PUT)
PUT /api/bookBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name |
sort | number | No | Sort order |
settings | object | No | Configuration object |
locales | object | No | Locale settings |
rights | array | No | Rights assignments |
Example
bash
curl -X PUT http://localhost:8080/api/book \
-H "Authorization: Bearer JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Annual Report 2025"}'Response: {"status": "ok", "id": 42}
Update Book (POST)
POST /api/book/:idBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name |
id | number | No | Entity ID |
sort | number | Yes | Sort order |
settings | object | Yes | Configuration object |
locales | object | Yes | Locale settings |
rights | array | Yes | Rights assignments |
Partial Update (PATCH)
PATCH /api/book/:idBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Display name |
id | number | No | Entity ID |
sort | number | No | Sort order |
settings | object | No | Configuration object |
locales | object | No | Locale settings |
rights | array | No | Rights assignments |
All fields are optional — only provided fields are updated.
Delete Book
DELETE /api/book/:idCascades: Deletes all chapters and their contributions within this book.
Response: {"status": "ok", "affected_items": 15}