package controller to new rest api