Im trying to unregister a replica using REST API...
I can get a list of replicaID's but cant figure out how to construct the python to do the unregister..
for r in replica_list:
replicaIDValue = (r['replicaID'])
print(replicaIDValue)
portal_item = gis.content.get('8faacd82xxxxxxxxxac03410')
ports_layer = portal_item.layers[0]
#removeReplica = ports_layer.UnregisterReplica(replicaID = replicaIDValue)
removeReplica = portal_item.unRegisterReplica(replicaID = replicaIDValue)
I tried to user Ports_item which is the ID of the Service
Error:
removeReplica = portal_item.unRegisterReplica(replicaID = replicaIDValue)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\__init__.py", line 10400, in __getattr__
"'%s' object has no attribute '%s'" % (type(self).__name__, name)
AttributeError: 'Item' object has no attribute 'unRegisterReplica'
and portal_item which is the specific feature TABLE in the service
Error
removeReplica = ports_layer.unRegisterReplica(replicaID = replicaIDValue)
AttributeError: 'FeatureLayer' object has no attribute 'unRegisterReplica'