API reference
All list endpoints return JSON by default. Add ?format=xml or ?format=csv, or send an Accept header. Static downloads live under /exports/ (e.g. products.csv).
Pagination styles
- Page-based:
?page=2&per_page=20 - Offset-based:
?offset=40&limit=20 - Cursor-based: start with
?cursor=&limit=20, then passmeta.nextCursoras?cursor=until it isnull
| Method | Path | Description |
|---|---|---|
| GET | /api/products | List products. Filters: q, category, brand, inStock, min_price, max_price. Sort: price, -price, rating, name, createdAt. |
| GET | /api/products/{id} | One product including reviews and related product IDs. |
| GET | /api/blog | List blog posts. Filters: q, category, authorName. Sort: publishedAt, title. |
| GET | /api/jobs | List jobs. Filters: q, company, remote, employmentType. Sort: salaryMin, salaryMax, postedAt. |
| GET | /api/real-estate | List properties. Filters: q, listingType, propertyType, bedrooms, min_price, max_price. |
| GET | /api/rate-limit/{none|mild|strict} | Rate-limit demo: unlimited, 60/min, 5/min. Inspect the X-RateLimit-* and Retry-After headers. |
| GET | /api/auth/csrf | Get a CSRF token (cookie + JSON). |
| POST | /api/auth/login | Log in with a form post or JSON. Requires the CSRF token. |
| POST | /api/auth/logout | Clear the session cookie. |
| GET | /api/auth/me | Current session, or 401. |
| POST / GET | /api/auth/jwt | Bearer-token demo: POST credentials to get a JWT, GET with Authorization: Bearer to inspect it. |
| GET | /api/health | Health check. |
| GET | /api/stats | Request statistics for the serving instance. |