javascript api test