CAL-861 add API and test cases