add api url
save the layers even if the was is not available, by @ingenieroariel