Complete REST API documentation for Allo-Scrapper.
User authentication and JWT token management.
Endpoints:
POST /api/auth/login- Login and get JWT tokenPOST /api/auth/logout- Logout (invalidate token)GET /api/auth/me- Get current user info
Theater management and metadata.
Endpoints:
GET /api/theaters- List all theatersGET /api/theaters/:id- Get theater detailsPOST /api/theaters- Add new theater (admin only)PUT /api/theaters/:id- Update theater (admin only)DELETE /api/theaters/:id- Delete theater (admin only)POST /api/theaters/sync- Sync from config file (admin only)
Movie information and showtimes.
Endpoints:
GET /api/movies- List all moviesGET /api/movies/:id- Get movie detailsGET /api/movies/:id/showtimes- Get showtimes for a movie
Scraper control, progress tracking, SSE events, and schedule management.
Endpoints:
POST /api/scraper/trigger- Trigger scrape (full or single theater) [Auth]GET /api/scraper/status- Get scraper status [Auth]GET /api/scraper/progress- SSE progress stream [Auth]GET /api/scraper/schedules- List scrape schedules [Auth]POST /api/scraper/schedules- Create schedule [Auth]PUT /api/scraper/schedules/:id- Update schedule [Auth]DELETE /api/scraper/schedules/:id- Delete schedule [Auth]
Scrape report history and details.
Endpoints:
GET /api/reports- List scrape reports (paginated)GET /api/reports/:id- Get specific report details
Application settings and white-label configuration.
Endpoints:
GET /api/settings- Get public settingsGET /api/settings/admin- Get all settings (admin only)PUT /api/settings- Update settings (admin only)POST /api/settings/reset- Reset to defaults (admin only)GET /api/settings/export- Export settings JSON (admin only)POST /api/settings/import- Import settings JSON (admin only)
Role and permission management.
Endpoints:
GET /api/roles- List all roles (requiresroles:list)GET /api/roles/permissions- List all available permissionsGET /api/roles/:id- Get role with permissions (requiresroles:read)POST /api/roles- Create custom role (requiresroles:create)PUT /api/roles/:id- Update role (requiresroles:update)DELETE /api/roles/:id- Delete role (requiresroles:delete)PUT /api/roles/:id/permissions- Set role permissions (requiresroles:update)
User management and role assignment.
Endpoints:
GET /api/users- List users (requiresusers:list)GET /api/users/:id- Get user by ID (requiresusers:list)POST /api/users- Create user (requiresusers:create)PUT /api/users/:id/role- Update user role (requiresusers:update)POST /api/users/:id/reset-password- Reset password (requiresusers:update)DELETE /api/users/:id- Delete user (requiresusers:delete)
System information, metrics, and health checks.
Endpoints:
GET /api/health- Health check (rate-limited, cached 5 seconds)GET /api/system/info- System info (requiressystem:info)GET /metrics- Prometheus metrics [Auth]
API rate limiting policies, headers, and admin configuration.
What you'll learn:
- Rate limit tiers
- Rate limit headers
- Handling 429 responses
- Exemptions
http://localhost:3000/api
Most endpoints require JWT authentication via Bearer token:
Authorization: Bearer <token>
All responses follow this structure:
{
"success": true,
"data": { ... },
"message": "Optional message"
}{
"success": false,
"error": "Error message",
"code": "ERROR_CODE"
}200- Success201- Created400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Too Many Requests500- Internal Server Error
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin"}'curl -X POST http://localhost:3000/api/scraper/trigger \
-H "Authorization: Bearer <token>"curl http://localhost:3000/api/reports \
-H "Authorization: Bearer <token>"