'GET /api/datasets/{encoded_dataset_id}
Displays information about and/or content of a dataset.'

@web.expose_api_anonymous
def show(self, trans, id, hda_ldda='hda', data_type=None, provider=None, **kwd):

    try:
        dataset = self.get_hda_or_ldda(trans, hda_ldda=hda_ldda, dataset_id=id)
    except Exception as e:
        return str(e)
    try:
        if (data_type == 'state'):
            rval = self._dataset_state(trans, dataset)
        elif (data_type == 'converted_datasets_state'):
            rval = self._converted_datasets_state(trans, dataset, kwd.get('chrom', None), is_true(kwd.get('retry', False)))
        elif (data_type == 'data'):
            rval = self._data(trans, dataset, **kwd)
        elif (data_type == 'features'):
            rval = self._search_features(trans, dataset, kwd.get('query'))
        elif (data_type == 'raw_data'):
            rval = self._raw_data(trans, dataset, provider, **kwd)
        elif (data_type == 'track_config'):
            rval = self.get_new_track_config(trans, dataset)
        elif (data_type == 'genome_data'):
            rval = self._get_genome_data(trans, dataset, kwd.get('dbkey', None))
        elif (hda_ldda == 'hda'):
            return self.hda_serializer.serialize_to_view(dataset, view=kwd.get('view', 'detailed'), user=trans.user, trans=trans)
        else:
            rval = dataset.to_dict()
    except Exception as e:
        rval = ('Error    in    dataset    API    at    listing    contents:    ' + str(e))
        log.error((rval + (':    %s' % str(e))), exc_info=True)
        trans.response.status = 500
    return rval
