Changed rest api, more functionality