add api of resouce ,add test case for resource api