Closed pferrariuy closed 3 months ago
Endpoints and and payloads
Payload: none Response:
{
"reports": [
{
"id": 2,
"title": "Weekly",
"order": 1
}
],
"locations": [
{
"id": 20,
"code": "a code",
"name": "a name",
"address": "an address",
"state": "a state",
"country": null,
"typeOf": null,
"latitude": -34
"longitude": -56
"outputCapacity": 27.0,
"outputTotalCapacity": 27.0,
"referenceDensity": null,
"type": "solar",
"gridConnected": true,
"enabled": true,
"demoDate": null,
"dataDefinitionId": null,
"dataDefinition": null,
"stations": null,
"generators": null,
"sdgs": null
}
],
"settings": [
{
"locId": 20,
"repId": 2,
"selected": false
}
],
"loaded": true,
"saved": false
}
Payload:
{
"settings": [
{
"locId": 20,
"repId": 2,
"selected": true
}
]
}
Response:
{
"reports": [
{
"id": 2,
"title": "Weekly",
"order": 1
}
],
"locations": [
{
"id": 20,
"code": "a code",
"name": "a name",
"address": "an address",
"state": "a state",
"country": null,
"typeOf": null,
"latitude": -34
"longitude": -56
"outputCapacity": 27.0,
"outputTotalCapacity": 27.0,
"referenceDensity": null,
"type": "solar",
"gridConnected": true,
"enabled": true,
"demoDate": null,
"dataDefinitionId": null,
"dataDefinition": null,
"stations": null,
"generators": null,
"sdgs": null
}
],
"settings": [
{
"locId": 20,
"repId": 2,
"selected": false
}
],
"loaded": true,
"saved": false
}
Payload: none Response:
{
"reports": [
{
"id": 2,
"name": "WEEKLY",
"title": "Weekly",
"requires": "week"
}
]
}
Payload:
{
"location": "20",
"report": {
"id": "2",
"values": [
"2024-08-12"
]
}
}
Response:
{
"report": {
"id": 2,
"name": "WEEKLY",
"title": "Weekly",
"requires": "week",
"values": [
"2024-08-12"
]
},
"generated": true,
"willSendTo": "user_email@domain.com"
}
Description
Generate the required endpoints for report configuration and report generation from the UI.
Use Case
Use case set report settings
Use case generate report
Expected Behavior
The selected terports by the user will be send to the user's email.
Implementation Suggestions
Report generation must be done in background / thread in order to avoid the use to keep waiting during the generation of the report.
Impact on Existing Features
None, feature is a new requeriment.
Related Issues