Added CSV format to query events endpoint.