tracardi icon indicating copy to clipboard operation
tracardi copied to clipboard

Report server

Open atompie opened this issue 3 years ago • 0 comments

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"
}

atompie avatar Aug 03 '22 12:08 atompie