diff --git a/api/__init__.py b/api/__init__.py
index 3b99500..46eaa04 100644
--- a/api/__init__.py
+++ b/api/__init__.py
@@ -16,7 +16,11 @@
 module_bp = Module('netopeer', __name__, url_prefix = '/netopeer', no_version = True)
 
 from .schemas import *
+from .devices import *
 
 module_bp.add_url_rule('/inventory/schemas/list', view_func = schemas_list, methods=['GET'])
 module_bp.add_url_rule('/inventory/schemas', view_func = schemas_add, methods=['POST'])
 module_bp.add_url_rule('/inventory/schemas', view_func = schemas_rm, methods = ['DELETE'])
+module_bp.add_url_rule('/inventory/devices/list', view_func = devices_list, methods=['GET'])
+module_bp.add_url_rule('/inventory/devices', view_func = devices_add, methods=['POST'])
+module_bp.add_url_rule('/inventory/devices', view_func = devices_rm, methods = ['DELETE'])
diff --git a/api/devices.py b/api/devices.py
new file mode 100644
index 0000000..762fdaf
--- /dev/null
+++ b/api/devices.py
@@ -0,0 +1,123 @@
+"""
+Manipulation with the devices to connect.
+File: devices.py
+Author: Radek Krejci <rkrejci@cesnet.cz>
+"""
+
+from liberouterapi import auth, config
+from flask import request
+import json
+import os
+import errno
+
+from .inventory import INVENTORY, inventory_check
+from .error import NetopeerException
+
+__DEVICES_EMPTY = '{"device":[]}'
+
+
+def __devices_init():
+	return json.loads(__DEVICES_EMPTY)
+
+def __devices_inv_load(path):
+	devicesinv_path = os.path.join(path, 'devices.json')
+	try:
+		with open(devicesinv_path, 'r') as devices_file:
+			devices = json.load(devices_file)
+	except OSError as e:
+		if e.errno == errno.ENOENT:
+			devices = __devices_init()
+		else:
+			raise NetopeerException('Unable to use user\'s devices inventory ' + devicesinv_path + ' (' + str(e) + ').')
+	except ValueError:
+		devices = __devices_init()
+
+	return devices
+
+def __devices_inv_save(path, devices):
+	devicesinv_path = os.path.join(path, 'devices.json')
+
+	#store the list
+	try:
+		with open(devicesinv_path, 'w') as devices_file:
+			json.dump(devices, devices_file)
+	except Exception:
+		pass
+
+	return devices
+
+@auth.required()
+def devices_list():
+	session = auth.lookup(request.headers.get('Authorization', None))
+	user = session['user']
+	path = os.path.join(INVENTORY, user.username)
+	
+	inventory_check(path)
+	devices = __devices_inv_load(path)
+	
+	return(json.dumps(devices['device']))
+
+@auth.required()
+def devices_add():
+	session = auth.lookup(request.headers.get('Authorization', None))
+	user = session['user']
+	path = os.path.join(INVENTORY, user.username)
+
+	device = request.get_json()
+	if not device or not device['id']:
+		raise NetopeerException('Invalid device remove request.')
+
+	devices = __devices_inv_load(path)
+	for dev in devices['device']:
+		if dev['id'] == device['id']:
+			return (json.dumps({'success': False}))
+
+	device_json = {'id':device['id'], 'hostname':device['hostname'], 'port':device['port']}
+	if 'username' in device:
+		device_json['username'] = device['username']
+		if 'password' in device:
+			device_json['password'] = device['password']
+	devices['device'].append(device_json)
+
+	#store the list
+	__devices_inv_save(path, devices)
+
+	return(json.dumps({'success': True}))
+
+@auth.required()
+def devices_rm():
+	session = auth.lookup(request.headers.get('Authorization', None))
+	user = session['user']
+	path = os.path.join(INVENTORY, user.username)
+
+	rm_id = request.get_json()['id']
+	if not rm_id:
+		raise NetopeerException('Invalid device remove request.')
+
+	devices = __devices_inv_load(path)
+	for i in range(len(devices['device'])):
+		device = devices['device'][i]
+		if device['id'] == rm_id:
+			devices['device'].pop(i)
+			device = None
+			break;
+
+	if device:
+		# device not in inventory
+		return (json.dumps({'success': False}))
+
+	# update the inventory database
+	__devices_inv_save(path, devices)
+
+	return(json.dumps({'success': True}))
+
+def devices_get(device_id, username):
+	path = os.path.join(INVENTORY, username)
+	devices = __devices_inv_load(path)
+
+	for i in range(len(devices['device'])):
+		device = devices['device'][i]
+		if device['id'] == device_id:
+			return device
+
+	return None
\ No newline at end of file
