📚 Book Request API

Welcome to the Book Request Management API

Available Endpoints:

GET /health

Health check endpoint

GET /stats

Database statistics

GET /search_books?q=query&page=1&per_page=20

Search books with pagination

POST /upload_data

Upload book data

POST /claim_books

Claim books for download

GET /metrics

Server metrics

📚 Book Management

GET /books?page=1&per_page=20&status=pending

Get books with filtering and pagination

GET/PUT/DELETE /books/{book_id}

Manage specific book

POST /books/bulk_update

Bulk update books

POST /books/cleanup

Clean up incomplete/duplicate books

🔍 Keyword Management

GET/POST /keywords

Get or create keywords

GET/PUT/DELETE /keywords/{keyword_id}

Manage specific keyword

POST /keywords/status

Update keyword status

POST /keywords/sync

Sync keywords from external source

POST /keywords/cleanup

Clean up processed keywords

👤 Account Management

GET/POST /accounts

Get or create accounts

GET/PUT/DELETE /accounts/{account_id}

Manage specific account

GET /accounts/available

Get available accounts (not expired)

POST /accounts/reset_limits

Reset all account limits

POST /accounts/cleanup

Clean up expired accounts

👥 User Management

GET/POST /users

Get or create users

GET/PUT/DELETE /users/{user_id}

Manage specific user

POST /users/login

User login

POST /users/cleanup

Clean up inactive users

🗄️ Database Management

GET /database/stats

Get comprehensive database statistics

POST /database/cleanup

Perform database cleanup operations

POST /database/backup

Create database backup

Status: ✅ API is running with full database management

Cache: Simple in-memory cache (no Redis)

Rate Limiting: Simple in-memory rate limiting

Tables: book_data, keyword_list, akun_zlib, user