def get_metadata_view(request):
  queryParams = request.GET.copy()
  queryParams.update(request.POST)

  key = queryParams.get('key')
  metrics = queryParams.getlist('metric')
  jsonp = queryParams.get('jsonp', False)
  results = {}
  for metric in metrics:
    try:
      results[metric] = CarbonLink.get_metadata(metric, key)
    except Exception:
      log.exception()
      results[metric] = dict(error="Unexpected error occurred in CarbonLink.get_metadata(%s, %s)" % (metric, key))

  return json_response_for(request, results, jsonp=jsonp)