API Playground - Test Live APIs
Interactive API Testing • Execute Real Calls • See Live Responses
This is your interactive API playground where you can test all MAHATI APIs with real JWT tokens and see live responses.
🎯 How to Use This API Playground
1️⃣ Get Your JWT Token
First, authenticate to get your access token:
- Find "Auth Service" section above
- Click
POST /prisma/api/auth/login - Click "Try it out"
- Enter your credentials in the request body:
- Click "Execute"
- Copy the
tokenvalue from the response
2️⃣ Authorize All API Calls
- Click the 🔒 Authorize button at the top
- Enter your token in this exact format:
- Click "Authorize" then "Close"
3️⃣ Test Any API Endpoint
Now you can test any API: 1. Choose any service (Admin, Billing, Claims, etc.) 2. Click on any endpoint (GET, POST, PUT, DELETE) 3. Click "Try it out" 4. Fill in parameters if needed 5. Click "Execute" 6. See the live response instantly! 🚀
🔧 Available Services for Testing
🔧 Admin Service
Port 3033Database operations, user management, CRUD operations
Test endpoints: Users, Roles, System settings🔐 Auth Service
Port 3023Authentication, login, token validation, MFA
Test endpoints: Login, Logout, Token refresh💳 Billing Service
Port 3025Payment processing, invoicing, billing management
Test endpoints: Payments, Invoices, Billing📋 Claims Service
Port 3026Insurance claims processing and management
Test endpoints: Create claim, Process, Status📁 Document Service
Port 3005File uploads, document storage and management
Test endpoints: Upload, Download, Delete👤 Individual Service
Port 3027Customer profiles, individual user management
Test endpoints: Profiles, Personal data💻 Example API Tests You Can Run
Login and Get Token
POST /prisma/api/auth/login
Content-Type: application/json
{
"username": "developer@mahati.com",
"password": "dev123"
}
Get User List
Upload a File
Process Insurance Claim
POST /api/claims/submit
Authorization: Bearer your-jwt-token
Content-Type: application/json
{
"policyNumber": "POL-2025-001",
"claimAmount": 5000.00,
"incidentDate": "2025-12-09",
"description": "Vehicle accident claim"
}
Create Billing Invoice
POST /api/billing/invoices
Authorization: Bearer your-jwt-token
Content-Type: application/json
{
"customerId": "CUST-001",
"amount": 1500.00,
"description": "Insurance premium",
"dueDate": "2025-12-31"
}
✅ What You Can Test Here
🔍 All HTTP Methods
- GET - Retrieve data (users, policies, claims)
- POST - Create new records (login, upload, submit)
- PUT - Update existing data (profiles, settings)
- DELETE - Remove records (files, users)
🔐 Authentication Testing
- JWT Bearer token authentication
- Token validation and expiry
- Protected endpoint access
- Permission-based operations
📁 File Operations
- File upload with multipart/form-data
- Document download and retrieval
- Image and PDF handling
- Binary data processing
💾 Data Operations
- JSON request/response handling
- Form data submission
- Query parameter filtering
- Pagination and sorting
🎯 Success Indicators
When your API calls work correctly, you'll see: - ✅ Status: 200-299 (Success codes) - ✅ Response Time (e.g., "145ms") - ✅ JSON Response Data (Properly formatted) - ✅ Response Headers (Content-Type, etc.)
⚠️ Troubleshooting
Common Issues and Solutions
🔴 401 Unauthorized
- Check JWT token format: Must start with Bearer
- Ensure token hasn't expired
- Verify login credentials are correct
🔴 404 Not Found - Verify API service is running on correct port - Check endpoint URL spelling - Confirm service is accessible
🔴 CORS Policy Error - API services need CORS headers - Contact admin to whitelist your domain - May need proxy configuration
🔴 Network Connection Failed - Ensure services are running locally - Check firewall settings - Verify port accessibility
🚀 Ready to Test APIs?
Use the interactive interface above to execute real API calls against MAHATI services!
Start by getting your JWT token, then test any endpoint!