Remove hacky api code

We were fetching the path manually, but after trying it, the API works
fine, so switch back to thta.