Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Improvement: Aggregate using byActivity #40

@timo-at-lanalabs

Description

@timo-at-lanalabs

api.aggregate(log_id, metric="frequency", grouping= "byActivity", values_from= "allEvents", activities=["Ablesung erfasst"])

To get a the counts of events grouped by the events the activities need to be supplied. If no activites are supplied all should be considered.

It is possible to make a request without providing the activities:

aggregation_post = {
    'miningRequest': {'logId': log_id},
    'valuesFrom': {
        'type': 'allEvents'
    },
    'metric': {
        'type': 'frequency'      
    },
    "grouping": {
        "type": "byActivity"
    },
    "options":{"maxAmountAttributes": 10000}
    }

r = requests.post(
    'https://cloud-backend.lanalabs.com/api/v2/aggregate-data',
    headers={'API-Key': api_key},
    json=aggregation_post
)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions