add resouce apis ,add test case for api