add api endpoints tests