Added javascript interface to implement ReST services