def METHOD_NAME(request):
  pig_api = api.get(request.fs, request.jt, request.user)
  jobs = pig_api.get_jobs()
  hue_jobs = Document.objects.available(PigScript, request.user, with_history=True)
  massaged_jobs = pig_api.massaged_jobs_for_json(request, jobs, hue_jobs)
  return JsonResponse(massaged_jobs, safe=False)