Access timeline information through API :from/to of tasks

I track the tasks duration through the timeline, where I can put a from and to date on tasks.
I would like to access those data through the API in order to build metrics on time spent on given projects for instance.
From what I saw there is no way to get those information, are there any known hacks out there ?