@app.route('/scans/<int:scan_id>/status', methods=['GET'])
@requires_auth
def scan_status(scan_id):
 scan_info = get_scan_info_from_id(scan_id)
 if (scan_info is None):
  abort(404, 'Scan not found')
 exc = scan_info.exception
 status = scan_info.w3af_core.status.get_status_as_dict()
 status['exception'] = (exc if (exc is None) else str(exc))
 return jsonify(status)

@ app . route ( '/scans/<int:scan_id>/status' , methods = [ 'GET' ] ) @ requires_auth def scan_status ( scan_id ) : scan_info = get_scan_info_from_id ( scan_id ) if ( scan_info is None ) : abort ( 404 , 'Scan not found' ) exc = scan_info . exception status = scan_info . w3af_core . status . get_status_as_dict ( ) status [ 'exception' ] = ( exc if ( exc is None ) else str ( exc ) ) return jsonify ( status )
returns status of a scan .