@app.route('<STR_LIT>', methods=['<STR_LIT:GET>'])<EOL>def list_devices():
output = {}<EOL>for device_id, device in devices.items():<EOL><INDENT>output[device_id] = {<EOL>'<STR_LIT:host>': device.host,<EOL>'<STR_LIT:state>': device.state<EOL>}<EOL><DEDENT>return jsonify(devices=output)<EOL>
List devices via HTTP GET.