#NEWLINE# def data_dump_submit( self , type , filter , source = None , count = None ) : #NEWLINE# #INDENT# 'Performa data dump of the given source type.\n\n        :param str type: A source type\n        :param str filter: An sql style query string\n        :param str source: A single data source\n        :param int count: Return the top "count" results\n        :returns dict: Should contain the key `requestId` to get results\n        ' #NEWLINE# endpoint = ( '/api/data/query/' + type ) #NEWLINE# params = { #NEWLINE# #INDENT# '$filter' : filter , #NEWLINE# #UNINDENT# } #NEWLINE# if ( source is not None ) : #NEWLINE# #INDENT# params [ '$source' ] = source #NEWLINE# #UNINDENT# if ( count is not None ) : #NEWLINE# #INDENT# params [ '$top' ] = str ( count ) #NEWLINE# #UNINDENT# result = json . loads ( self . _request ( 'GET' , endpoint , params = params ) ) #NEWLINE# if ( result [ 'status' ] not in ( 0 , 1 ) ) : #NEWLINE# #INDENT# raise Exception ( ( 'Request failed with %s' % result [ 'errors' ] ) ) #NEWLINE# #UNINDENT# return result