I have published all my services prior to adding a load balancer and have noticed that the URL for the service on the Portal item still references the non-load balanced URL. I though setting the WebContextURL on the Portal and the Server to the load balanced URL would resolve that. I would like to avoid having to republish everything after setting up the load balancer, since the load balanced URL is already being used for our existing production. I have attempted changing it using the Python API, but get an error saying the URL cannot be edited, only thing that works is changing it from http to https. I was hoping that the URLs in the items would be relative, but it looks like they are not.
Yes, non-hosted services, applications, and operational and basemap service URLs within webmaps can be updated via the Sharing API using a script, but did you need to update hosted services? Those cannot be updated via the Sharing API and need to be updated elsewhere, a workflow that is not supported and risky.
No, we didn't find a way to update the URL for hosted services. We deleted those and will recreated as needed. We also deleted all Insights content since those too are in the hosted folder. The change to the secruity-config.json was necessary because it still retained a reference to the prior web adapter URL. This wasn't changed by using the Update Server REST Endpoint.
Hi Eric,
Can you share the code you used to update the URLs of non-hosted feature services?
Thank you!
Thank you. Really appreciate your willingness to share!
I used these tools also. Though some webmaps didn't get updated. However I think it was probably user error! I recommend as much testing as possible. There may be other tools but I didn't find any really good examples of exactly what I wanted to do (essentially a mass search and replace of an old web adaptor name to a new web adaptor name for all content that could contain those strings).
If you have qa portal running on VMs that would be helpful since you could create a snapshot prior to testing and restore if something doesn't work as planned.
Hello Jonathan Quinn,
do you have more information about this request ? Any version number for example ?
Thanks !
Might be good to create an idea ? I did not find any thing related to that.