Add API root endpoint at /api/

Created /api/ endpoint that returns JSON with:
- API status
- Available endpoints
- Version information

This fixes the "Not Found" error when accessing /api/ and
provides a useful API discovery endpoint for clients.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Keith Smith
2025-12-26 17:24:16 -07:00
co-authored by Claude Sonnet 4.5
parent 6eb277c701
commit d1720bebb3
2 changed files with 27 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
"""
API root views for KeepItGoing.
"""
from django.http import JsonResponse
def api_root(request):
"""
API root endpoint - returns available API endpoints.
"""
return JsonResponse({
'message': 'KeepItGoing API',
'version': '1.0',
'endpoints': {
'users': '/api/users/',
'tasks': '/api/tasks/',
'sync': '/api/sync/',
'notifications': '/api/notifications/',
'admin': '/admin/',
},
'status': 'running'
})