Added csv download into detail aggregate api endpoint.
Returning an error when a bad output format is chosen with detail-aggregate endpoint
Returning an error from timeseries endpoint when bad output format is selected