api code test