API - To get time spent in each actions for a period rather than for the whole page visit

@Swaminathan_Subraman I managed to get average time for a custom dimension. See How is "Average Time on Dimension" computed?

Still wondering how is it computed exactly.