rest api now works. untested