RESTful API untuk Platform Kesehatan Ibu Hamil
Base URL:
{ "success": true, "message": "Request berhasil", "data": { ... }, "timestamp": "2025-01-28T10:00:00Z" }
API menggunakan JWT (JSON Web Tokens) untuk authentication. Include token di header:
Authorization: Bearer YOUR_JWT_TOKEN
/api/auth/register
/api/auth/login
/api/auth/refresh
Limit | Window | Scope |
---|---|---|
100 requests | 15 minutes | Per IP Address |
Welcome message & API information
Health check & system status
Interactive API documentation (this page)
Registrasi pengguna baru
Body: name, email, password, phone
Login pengguna & mendapatkan JWT token
Body: email, password
Refresh JWT token
Get user profile & pregnancy data
Update user profile information
Prediksi risiko kesehatan menggunakan AI (84.21% akurasi)
Body: age, systolic_bp, diastolic_bp, bs, body_temp, heart_rate
Riwayat prediksi kesehatan pengguna
Get all user photos/videos
Upload foto/video baru (max 10MB)
Content-Type: multipart/form-data
Hapus foto/video tertentu
Get pregnancy timeline & milestones
Analyze symptoms & get recommendations
curl -X POST https://api-velora.vercel.app/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "name": "Jane Doe", "email": "jane@example.com", "password": "securePassword123", "phone": "+628123456789" }'
curl -X POST https://api-velora.vercel.app/api/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "jane@example.com", "password": "securePassword123" }'
curl -X POST https://api-velora.vercel.app/api/health/predict \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -d '{ "age": 28, "systolic_bp": 120, "diastolic_bp": 80, "bs": 6.5, "body_temp": 98.6, "heart_rate": 76 }'
{ "success": true, "message": "Prediksi berhasil", "data": { "risk_level": "low", "probability": 0.15, "recommendations": [ "Pertahankan pola makan sehat", "Lakukan olahraga ringan secara teratur", "Kontrol rutin setiap bulan" ] }, "timestamp": "2025-01-28T10:00:00Z" }
Service | Status | Response Time | Uptime |
---|---|---|---|
API Server | Healthy | < 200ms | 99.9% |
Database | Connected | < 50ms | 99.99% |
ML API | Available | < 500ms | 99.5% |
Property | Value |
---|---|
Version | 1.0.0 |
Environment | Production |
Last Deploy | 2025-01-28 10:00:00 UTC |
Region | Singapore (sin1) |