Change apiURL to mw.Api()

Change-Id: I54ec5fa7e21a7a13eff2a88eb59b87e0b4ba2cd8