fix sample api for testing