code: def list_prefix(self):
          
  
          # fetch attributes from request.json
          attr = XhrController.extract_prefix_attr(request.json)
  
          try:
              prefixes = Prefix.list(attr)
          except NipapError, e:
              return json.dumps({'error': 1, 'message': e.args, 'type': type(e).__name__})
  
          return json.dumps(prefixes, cls=NipapJSONEncoder)
docs: List prefixes and return JSON encoded result.