@api_experimental.route('<STR_LIT>', methods=['<STR_LIT:GET>'])<EOL>@requires_authentication<EOL>def task_info(dag_id, task_id):
try:<EOL><INDENT>info = get_task(dag_id, task_id)<EOL><DEDENT>except AirflowException as err:<EOL><INDENT>_log.info(err)<EOL>response = jsonify(error="<STR_LIT:{}>".format(err))<EOL>response.status_code = err.status_code<EOL>return response<EOL><DEDENT>fields = {k: str(v)<EOL>for k, v in vars(info).items()<EOL>if not k.startswith('<STR_LIT:_>')}<EOL>return jsonify(fields)<EOL>
Returns a JSON with a task's public instance variables.