Question

Upload I3S with AGOLconnector - And keep Item ID

  • 7 February 2022
  • 4 replies
  • 1 view

Badge

Hi,

Is there any way to control the ID when uploading I3S files via ArcGISOnlineconnector? Does not seem to have a replace action. Delete and uploads works fine but its kind of useless when the apps no longer can identify the scene layers

cheers Henrik


4 replies

Userlevel 6
Badge +33

I think you are looking for the "Replace Layer" functionality in ArcGIS Online. What you need to do is upload the i3S, publish to a new service, then replace the layer with the new service. This can be done using a HTTPCaller.

Badge +9

I think you are looking for the "Replace Layer" functionality in ArcGIS Online. What you need to do is upload the i3S, publish to a new service, then replace the layer with the new service. This can be done using a HTTPCaller.

Some extra information on this, you need to have 2 services side by side; your original service and the service you want as a replacement. To differentiate between the two I generally give the new service a _Temp suffix.

 

The you use the following information in your http caller:

Http method is POST

Url = https://yourArcgisOnlineURL/sharing/rest/content/TheOwnerOfBothItems/replaceService

Replace all the bolded parts in the above URL with your own information

 

You use the POST request body to tell the ArcGIS Online Rest endpoint which service you want to have replaced.

The content type of the body has to be URL Encoded and needs the following key-value pairs:

toReplaceItemId = whatever the Id of the old Scene layer is

replacementItemId = the Id of the new Scene Layer

replacedServiceName = your old service is going to be renamed, so you get to choose what that name is going to be here

replaceMetadata = true/false (depends on whether you want to keep the item description of your old service or you new service )

createNewItem = true

f = json

token = your ArcGIS Online token

 

If done correctly, your new service will get the name of the old service as well as the item id. The old service gets a new name and a new item id.

 

Pro tip: try doing this in Postman before implementing it in FME, it makes troubleshooting a lot easier.

Badge

I think you are looking for the "Replace Layer" functionality in ArcGIS Online. What you need to do is upload the i3S, publish to a new service, then replace the layer with the new service. This can be done using a HTTPCaller.

Thanks a lot

Badge

Some extra information on this, you need to have 2 services side by side; your original service and the service you want as a replacement. To differentiate between the two I generally give the new service a _Temp suffix.

 

The you use the following information in your http caller:

Http method is POST

Url = https://yourArcgisOnlineURL/sharing/rest/content/TheOwnerOfBothItems/replaceService

Replace all the bolded parts in the above URL with your own information

 

You use the POST request body to tell the ArcGIS Online Rest endpoint which service you want to have replaced.

The content type of the body has to be URL Encoded and needs the following key-value pairs:

toReplaceItemId = whatever the Id of the old Scene layer is

replacementItemId = the Id of the new Scene Layer

replacedServiceName = your old service is going to be renamed, so you get to choose what that name is going to be here

replaceMetadata = true/false (depends on whether you want to keep the item description of your old service or you new service )

createNewItem = true

f = json

token = your ArcGIS Online token

 

If done correctly, your new service will get the name of the old service as well as the item id. The old service gets a new name and a new item id.

 

Pro tip: try doing this in Postman before implementing it in FME, it makes troubleshooting a lot easier.

Needed to add users to the url and it worked out perfectly https://yourArcgisOnlineURL/sharing/rest/content/users/TheOwnerOfBothItems/replaceService

Thanks again

Reply