componentInit takes api is parameter instead of request.