def get_all_metrics(limit=None):
 metrics = []
 def get_leafs_of_node(nodepath):
  for obj in get_matching_metrics(nodepath)['metrics']:
   if (int(obj['is_leaf']) == 1):
    metrics.append(obj['path'])
   else:
    get_leafs_of_node(obj['path'])
 get_leafs_of_node('')
 return metrics

def get_all_metrics ( limit = None ) : metrics = [ ] def get_leafs_of_node ( nodepath ) : for obj in get_matching_metrics ( nodepath ) [ 'metrics' ] : if ( int ( obj [ 'is_leaf' ] ) == 1 ) : metrics . append ( obj [ 'path' ] ) else : get_leafs_of_node ( obj [ 'path' ] ) get_leafs_of_node ( '' ) return metrics
grabs all metrics by navigating find api recursively .