replicate "result" structure from aggregate_by_api method (which works
as expected)