Refactored the timeline api to be similar to historic api