refactor management api in order to use view function in place of method view.