Implement API test cases

ZZzzz