split up rest-api and enforced  in frontend factory