add test for calling api