API Endpoints
User Endpoints
Generate Report
Endpoint: GET /api/user/report
Description: Generate reports in various formats
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| reportType | string | Yes | daily, monthly, hourly, granular |
| reportFormat | string | Yes | html, pdf, xlsx, csv |
| service | string | Yes | water, energy, level, etc. |
| jwt | string | Yes | Authentication token |
| targetIndustryId | string | Yes | Industry identifier |
| startDate | string | Yes | Start date (DD/MM/YYYY) |
| endDate | string | Yes | End date (DD/MM/YYYY) |
Example:
curl -X GET "http://localhost:5001/api/user/report?reportType=daily&reportFormat=pdf&service=water&jwt=TOKEN&targetIndustryId=IND123&startDate=01/01/2024&endDate=31/01/2024"
Response:
{
"status": "success",
"data": "..."
}
Admin Endpoints
Batch Processing Status
Endpoint: GET /api/admin/validate/batchProcessing
Description: Check batch processing status
Authentication: Admin JWT required
Response:
{
"status": "success",
"lastRun": "2024-01-01T00:00:00Z"
}
External Endpoints
Document external integration endpoints here.