Updated to work with new rest interface