one function to get data with optional param to specify point in time, restore date-range endpoint