tracardi
tracardi copied to clipboard
Report server
Task
Write a report server module. The idea behind it is to create a set of reports that have a ES query, input params and a transformation definition.
Each report is saved under a defined name. When the report is created it can be queried by the endpoint: /report/{name} + JSON Payload
Example
Report that has:
Name: visits-per-page Index: events Input payload:
{
"profileId": "<id>"
}
Query:
{
"query": {
"term": {
"profille.id": "{{payload@profileId}}"
}
},
"aggs": {
"attribCount": {
"terms": {
"field": "attributes.name"
}
}
},
"size": 0
}
This report can be accesed by POST /report/visits-per-page
{
"profileId": "xxxx"
}