Handle URL like api/1.8.
api.js update copied over from dapi.