add csv output option to api
Merge pull request #786 from unikent/feature/csv_api_output

add csv output option to api