Skip to main content

API Endpoints

User Endpoints

Generate Report

Endpoint: GET /api/user/report

Description: Generate reports in various formats

Parameters:

ParameterTypeRequiredDescription
reportTypestringYesdaily, monthly, hourly, granular
reportFormatstringYeshtml, pdf, xlsx, csv
servicestringYeswater, energy, level, etc.
jwtstringYesAuthentication token
targetIndustryIdstringYesIndustry identifier
startDatestringYesStart date (DD/MM/YYYY)
endDatestringYesEnd 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.