sample api client using Java language