This document contains all API endpoints with curl commands and their example outputs.
curl -s http://localhost:8000/api/pagescurl -s http://localhost:8000/api/public/milestonescurl -s http://localhost:8000/api/progresscurl -s http://localhost:8000/healthcurl -s -X POST http://localhost:8000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "your_password"}'curl -s http://localhost:8000/api/milestones \
-H "Authorization: Bearer YOUR_TOKEN"curl -s -X POST http://localhost:8000/api/pages \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"page_name": "Test Page",
"page_link": "https://example.com/test",
"total_questions": 50,
"completed_questions": 25,
"subject": "Chemistry",
"year": 2024,
"status": "In Progress"
}'curl -s -X PUT http://localhost:8000/api/pages/PAGE_ID \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"completed_questions": 50,
"status": "Completed"
}'curl -s -X DELETE http://localhost:8000/api/pages/PAGE_ID \
-H "Authorization: Bearer YOUR_TOKEN"To see all endpoints with live output, run:
./api_curl_live.sh