Fixing REST api and datalog as REST