Change the service link when using "store credentials" option

2598
11
01-08-2019 10:42 AM
AhmadSALEH1
Occasional Contributor III

Is there any way to change the Data source URL for a feature service when credentials are stored?

I have multiple feature services added to  ArcGIS online,  the sources of these services are secured  ArcGIS server (10.6.1) services.  

The services were added to ArcGIS Online using the option to store credentials. Now I need to change/update the services links and make it point to another machine or link.

Without storing credentials it was easy to change the service link by using the ArcGIS Online Assistant , but with storing the credentials a proxy item is created which securely stores the information!. The service url will look something like the following (in the AGOL and AGOL assistant):

http://utility.arcgis.com/usrsvcs/servers/3ce4ed6b06bfdgfdgthgfgfd/reset/services/A

The below screenshot from the service overview tab in AGOL:

But by looking at the service setting tab the Data Source URL still that same as the ArcGIS server, is there a method to edit this link to something like https://gis.ABC.com/arcigs/services

Thank you,

Ahmad

11 Replies
AdamEversole1
Esri Contributor

Hello Ahmad,

It does not look like that URL within these types of ArcGIS online Items are is editable in anyway. I attempted making a URL alteration to the items JSON with ArcGIS online assistant, It said the operation was not supported, and  when proceeding it still wouldn't let me, It reverted back to normal. It makes sense to me as the item has a dependent component on the Utilities services, so making alterations might break the items entirely. 

Creating a item pointing to a service seems to be easy enough, I think that's the best way to go about adding entirely new services as items in ArcGIS online.

If it's possible to overwrite your services that might be a cleaner way to maintain the URL and any items and maps that currently exist that use them, It would avoid the need to perform this task altogether. 

Hope this helps.

-Adam

AhmadSALEH1
Occasional Contributor III

Adam,

Thank you for your response. Same here, I tried to alter   the items using JSON with ArcGIS online assistant but it didn't work with me either.

It will be tedious job to create a new feature layers / web maps  if I changed the link or the service name!

What brought this  to discussion is that I am trying to configure the feature layers to use the Https protocol instead of the Http , so I thought that I can edit the feature service link by adding an "s" to  the link and I will be good to go!

Thanks a lot,

Ahmad

0 Kudos
AdamEversole1
Esri Contributor

Updating the SSL of your services makes actually makes a ton of sense why you would want to update the service items in ArcGIS online. I looked for ideas, if anyone else had requested this functionality, and found this one below:

 

Update existing item details to store credentials  

 

Its kinda vague but to me it looks like it would be helpful. like they are asking to be able to switch the Item form a Unstored to Stored credential item. I tested a Item that has no credentials and the URL can be updated all day long.   

 

Regardless our developers are always looking for ideas with valid use case like yours. 

AhmadSALEH1
Occasional Contributor III

Thank you Adam, It would be great to have this functionality in ArcGIS Online!. 

Now I have to destroy all of my feature services and build them again and then update the Web maps to read from the new feature  service, not forgetting also to setup the Web Map settings again such as Popups, layer visibility, labels ,etc.. 

Thank you for your help, I appreciate that.

Regards,

Ahmad

0 Kudos
ChelseaRozek
MVP Regular Contributor

Does it work if you update the sourceUrl when editing the item's JSON in ArcGIS Online Assistant ?

0 Kudos
AdamEversole1
Esri Contributor

Sorry, In my comment earlier I didn't specify the name of the value pair, it should read as below. 

 "attempted making an alteration the to the sourceUrl in the items JSON with ArcGIS online assistant"

... it didn't work. 

AhmadSALEH1
Occasional Contributor III

I think I found a solution for changing the SSL (Moving from HTTP to HTTPS).

- Go to the Web Map that reads from that map service or  the feature service.

- Edit the Web Map then Go to the Setting tab.

- Scroll down till you see the "Layer Settings" section.

- There is a button "Update Layers to HTTPS" click on it and I will update your layers to use the HTTPs! 

The result:

The location of this button is weird, it should be inside all feature layers or map services not only in the web map!

 

I will leave this question open because this method doesn't   provide a solution  in the case of the service name change or the domain name change. 

-Ahmad

AlexMetzler
New Contributor III

I have another use case where not being able to update the Data Source URL is causing issues. We have a Map Service (Server 10.5.1) that has 22 layers. The layers have been added to AGOL individually with their layer number URL such as /arcgisprod/rest/services/servicename/MapServer/8. If layer 7 is no longer needed in the service and we delete it and republish the service, all of the layer numbers readjust (8 becomes 7 and so on). It would be beneficial to be able to go to the settings page of the item and update the Data Source URL instead of recreating the items in AGOL and breaking all web maps, popups, labels, etc. Lesson learned is to not add layers individually by the layer number.

0 Kudos
ChelseaRozek
MVP Regular Contributor

Hi Alex, 

  This might help you: Map authoring considerations—Help | ArcGIS Desktop . Enabling Allow assignment of unique numeric IDs for map service publishing has helped us in the past when the layers in our services change and apps depend on URLs to the specific layer #.

If you use Pro, here's some documentation: Introduction to sharing web layers—ArcGIS Pro | Documentation  

0 Kudos