Live API Testing Interface
Execute Real API Calls • Add JWT Tokens • Test GET/POST/PUT/DELETE Methods
This page provides a fully interactive API testing interface where you can execute live API calls against MAHATI services.
🚀 Interactive API Tester
📋 How to Execute API Calls
Step 1: Authenticate with JWT Token
- Click the 🔒 Authorize button above
- In the "bearerAuth" field, enter your JWT token:
- Click Authorize and then Close
Step 2: Select API Service & Endpoint
- Choose from 14 available microservices
- Click on any endpoint (GET, POST, PUT, DELETE)
- The endpoint will expand showing parameters
Step 3: Execute API Call
- Click "Try it out" button
- Fill in required parameters
- Add request body (for POST/PUT)
- Click "Execute" button
- View the live response below!
🔧 Available API Services
| Service | Base URL | Test Methods |
|---|---|---|
| Admin | http://localhost:3033/api/admin |
GET, POST, PUT, DELETE |
| Auth | http://localhost:3023/prisma/api/auth |
POST (login), GET (validate) |
| Application | http://localhost:3020/api |
GET, POST, PUT |
| Billing | http://localhost:3025/api |
GET, POST, PUT |
| Claims | http://localhost:3026/api |
GET, POST, PUT, DELETE |
| Document | http://localhost:3005/api |
POST (upload), GET, DELETE |
| Policy | http://localhost:3028/api |
GET, POST, PUT, DELETE |
| + 7 more | Various ports | All HTTP methods |
💡 Quick Testing Examples
1. Test Login (POST Method)
POST /prisma/api/auth/login
Content-Type: application/json
{
"username": "user@example.com",
"password": "yourpassword"
}
2. Get User Data (GET Method)
3. Upload Document (POST with File)
4. Process Payment (POST Method)
POST /api/billing/process
Authorization: Bearer your-jwt-token
Content-Type: application/json
{
"amount": 100.00,
"currency": "USD"
}
🎯 Testing Features
✅ Real API Execution
- Execute actual HTTP requests to running services
- See real response data and status codes
- Test with live authentication tokens
- Handle file uploads and downloads
✅ Interactive Interface
- Click-to-test any endpoint
- Auto-populated parameter forms
- JSON request body editor
- Response viewer with syntax highlighting
✅ Authentication Support
- JWT Bearer token authentication
- Automatic token inclusion in requests
- Token validation and error handling
- Secure credential management
✅ Request/Response Inspection
- View complete HTTP headers
- See request/response timing
- Copy cURL commands
- Download response data
🔐 Authentication Guide
Get JWT Token
First, get your authentication token:
- Using the API Tester above:
- Find "Auth Service" section
- Click on
POST /prisma/api/auth/login - Click "Try it out"
- Enter your credentials:
- Click "Execute"
-
Copy the token from the response
-
Using cURL:
Use JWT Token
- Click the 🔒 Authorize button
- Enter:
Bearer your-jwt-token-here - All subsequent API calls will include this token
🛠️ Troubleshooting
Common Issues
❌ "401 Unauthorized"
- Check JWT token format: Bearer token-here
- Ensure token hasn't expired
- Verify credentials are correct
❌ "CORS Error" - API services need CORS headers enabled - Add your domain to CORS whitelist - Contact API team for configuration
❌ "Network Error" - Verify API services are running - Check correct ports (3005, 3020, 3023, etc.) - Ensure no firewall blocking
❌ "Invalid Request" - Check required parameters are filled - Validate JSON request body syntax - Review parameter types and formats
Success Indicators
- ✅ 200-299 status codes = Success
- ✅ JSON response data = API working
- ✅ Response time shown = Connection good
- ✅ No CORS errors = Properly configured
🎉 Ready to Test APIs!
This interactive interface allows you to:
- ✅ Execute real API calls with live responses
- ✅ Test authentication with JWT tokens
- ✅ Try GET, POST, PUT, DELETE methods
- ✅ Upload files and handle binary data
- ✅ Debug API issues with detailed responses
- ✅ Copy working cURL commands
Start testing by clicking any endpoint above!