def METHOD_NAME(request):
    tid = request.GET.get('id', '')
    tlist = BackgroundTaskOutputManager.retrieve_background_task_output_with_completed_id(tid)
    text = ""
    try:
        text = tlist[0].output_text
    except Exception as e:
        logger.error("read_output_record threw: " + str(e))
    json_data = {
        'data':                   text,
    }
    return HttpResponse(json.dumps(json_data), content_type='application/json')