move the resource api objects to its own file