Add RESTAPI methods. This needs a bit refactoring