@api_experimental.route(<EOL>'<STR_LIT>',<EOL>methods=['<STR_LIT:GET>'])<EOL>@requires_authentication<EOL>def dag_run_status(dag_id, execution_date):
<EOL>try:<EOL><INDENT>execution_date = timezone.parse(execution_date)<EOL><DEDENT>except ValueError:<EOL><INDENT>error_message = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>execution_date))<EOL>_log.info(error_message)<EOL>response = jsonify({'<STR_LIT:error>': error_message})<EOL>response.status_code = <NUM_LIT><EOL>return response<EOL><DEDENT>try:<EOL><INDENT>info = get_dag_run_state(dag_id, execution_date)<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>return jsonify(info)<EOL>
Returns a JSON with a dag_run's public instance variables.
The format for the exec_date is expected to be
"YYYY-mm-DDTHH:MM:SS", for example: "2016-11-16T11:34:15". This will
of course need to have been encoded for URL in the request.