AnsweredAssumed Answered

replace hosted feature class data

Question asked by afox on Sep 19, 2017

We have a set of hosted feature services that are already nicely symbolized. 

 

We have new data in a file geodatabase that needs to be uploaded to replace the previous version. This we can do using the python API and have running well. But our new layer has the default symbology. 

 

So we are trying the function below which seems to imply you can replace the Data for an item using an update call.

 

But its very vague as to what the data attribute is looking to accept. We have tried passing in a file gdb,  a new service url.

 

update(item_properties=None, data=None, thumbnail=None, metadata=None)

Updates an item in a Portal.

Note

That content can be a file (such as a layer package, geoprocessing package, map package) or it can be a URL (to an ArcGIS Server service, WMS service, or an application).

If you are uploading a package or other file, provide a path or URL to the file in the data argument.

Only pass in arguments for properties you want to update. All other properties will be left as they are. If you want to update description, then only provide the description argument in item_properties.

Any bright ideas on how to achieve this. 

Outcomes