'* GET /api/histories/{history_id}/contents/{id}/download
Download the content of a HistoryDatasetCollection as a tgz archive
while maintaining approximate collection structure.
:param id: encoded HistoryDatasetCollectionAssociation (HDCA) id
:param history_id: encoded id string of the HDCA\'s History'

@expose_api_raw_anonymous
def download_dataset_collection(self, trans, id, history_id, **kwd):

    try:
        service = trans.app.dataset_collections_service
        dataset_collection_instance = service.get_dataset_collection_instance(trans=trans, instance_type='history', id=id)
        return self.__stream_dataset_collection(trans, dataset_collection_instance)
    except Exception as e:
        log.exception('Error    in    API    while    creating    dataset    collection    archive')
        trans.response.status = 500
        return {'error': str(e)}
