Initial API functions and add into test case. #2