Newbie question on aggregation

Please forgive me is my question is too basic. I am quite new to grafana/ELK.

I have the below requirement.

I am using a managed file transfer product that emits events on the status of the transfers like

start event
in progress event
completed event

each transfer request could have a transfer for a single file or it could be batch of 10 or 50 or more…

i am splitting the progress event for each file if it is batch and send it as inidividual event.

completed event will have the total size of the 1 or 10 or 50 files.

these completed events will get generated whenever the transfer completes.

what i am trying to do is, aggregate the completed events in the last 5 minutes and add the total file size field in each of those event messages in the last 5 minutes and display as a time series.

each transfer is through a transfer agent, this way i want to create a vizualization of bytes through an agent every 5 minutes. Is this possible with aggregation?

i will be pumping all this events into elastic search as a JSON