add site switching support for api calls