Mobile Security & Anti-Theft Backend
http://10.0.2.2/rakshak2/api/
http://rakshak.pkstudy.co.in/rakshak2/api/
| Method | Endpoint | Description | Auth | Action |
|---|---|---|---|---|
| GET | api/health.php |
Server and MySQL health check diagnostics | Public | Test API |
| POST | api/register.php |
Register new account (Name, Mobile, Password) | Public | POST Body |
| POST | api/login.php |
Sign in with Mobile + Password (No OTP) | Public | POST Body |
| POST | api/logout.php |
Invalidate session token and mark device offline | Bearer | POST Body |
| GET | api/profile.php |
Get user profile & device statistics | Bearer | Protected |
| POST | api/save_location.php |
Ingest GPS coordinates, accuracy, battery % | Bearer | Protected |
| GET | api/location_history.php |
Paginated GPS tracking trail | Bearer | Protected |
| GET | api/devices.php |
List authorized user devices & battery status | Bearer | Protected |
| POST | api/add_device.php |
Generate 6-digit pairing code / link secondary phone | Bearer / Public | POST Body |
| GET | api/device_locations.php |
Latest coordinates of all devices for Map display | Bearer | Protected |
| POST | api/alarm.php |
Trigger emergency siren or poll active alarms | Bearer | POST Body |