move cases (REST) to api