Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

create_replica_fs.py fails with numerous errors #122

Closed tpcolson closed 8 years ago

tpcolson commented 8 years ago

create_replica_fs.py fails with numerous errors on a fc that has sync and editing enabled with the following many errors:

supportsCalculate - attribute not implemented in Feature Service. extent - attribute not implemented in Feature Service. supportsValidateSql - attribute not implemented in Feature Service. advancedQueryCapabilities - attribute not implemented in Feature Service. supportsCoordinatesQuantization - attribute not implemented in Feature Service. supportsRollbackOnFailureParameter - attribute not implemented in Feature Service. globalIdField - attribute not implemented in Feature Service. supportsAdvancedQueries - attribute not implemented in Feature Service. id - attribute not implemented in Feature Service. relationships - attribute not implemented in Feature Service. drawingInfo - attribute not implemented in Feature Service. indexes - attribute not implemented in Feature Service. geometryType - attribute not implemented in Feature Service. type - attribute not implemented in Feature Service. isDataVersioned - attribute not implemented in Feature Service. supportsAttachmentsByUploadId - attribute not implemented in Feature Service. defaultVisibility - attribute not implemented in Feature Service. typeIdField - attribute not implemented in Feature Service. objectIdField - attribute not implemented in Feature Service. minScale - attribute not implemented in Feature Service. types - attribute not implemented in Feature Service. hasM - attribute not implemented in Feature Service. displayField - attribute not implemented in Feature Service. name - attribute not implemented in Feature Service. templates - attribute not implemented in Feature Service. supportsStatistics - attribute not implemented in Feature Service. hasAttachments - attribute not implemented in Feature Service. fields - attribute not implemented in Feature Service. maxScale - attribute not implemented in Feature Service. hasZ - attribute not implemented in Feature Service. htmlPopupType - attribute not implemented in Feature Service. editFieldsInfo - attribute not implemented in Feature Service. supportsCalculate - attribute not implemented in Feature Service. extent - attribute not implemented in Feature Service. supportsValidateSql - attribute not implemented in Feature Service. advancedQueryCapabilities - attribute not implemented in Feature Service. supportsCoordinatesQuantization - attribute not implemented in Feature Service. supportsRollbackOnFailureParameter - attribute not implemented in Feature Service. globalIdField - attribute not implemented in Feature Service. supportsAdvancedQueries - attribute not implemented in Feature Service. id - attribute not implemented in Feature Service. relationships - attribute not implemented in Feature Service. drawingInfo - attribute not implemented in Feature Service. indexes - attribute not implemented in Feature Service. geometryType - attribute not implemented in Feature Service. type - attribute not implemented in Feature Service. isDataVersioned - attribute not implemented in Feature Service. supportsAttachmentsByUploadId - attribute not implemented in Feature Service. defaultVisibility - attribute not implemented in Feature Service. typeIdField - attribute not implemented in Feature Service. objectIdField - attribute not implemented in Feature Service. minScale - attribute not implemented in Feature Service. types - attribute not implemented in Feature Service. hasM - attribute not implemented in Feature Service. displayField - attribute not implemented in Feature Service. name - attribute not implemented in Feature Service. templates - attribute not implemented in Feature Service. supportsStatistics - attribute not implemented in Feature Service. hasAttachments - attribute not implemented in Feature Service. fields - attribute not implemented in Feature Service. maxScale - attribute not implemented in Feature Service. hasZ - attribute not implemented in Feature Service. htmlPopupType - attribute not implemented in Feature Service. editFieldsInfo - attribute not implemented in Feature Service. Not Supported

achapkowski commented 8 years ago

Please post your code and url.

tpcolson commented 8 years ago

""" This sample shows how to create a replica from a FS

""" from arcrest.security import AGOLTokenSecurityHandler from arcrest.agol import FeatureService from arcrest.common.filters import LayerDefinitionFilter

if name == "main": username = "user" password = "pass" url = "http://services1.arcgis.com/fBc8EJBxQRMcHlei/ArcGIS/rest/services/GRSM_RESTROOMS/FeatureServer/0" proxy_port = None proxy_url = None agolSH = AGOLTokenSecurityHandler(username=username, password=password) fs = FeatureService( url=url, securityHandler=agolSH, proxy_port=proxy_port, proxy_url=proxy_url, initialize=True) result = fs.createReplica(replicaName='Demo', layers='0', keep_replica=False, layerQueries=None, geometryFilter=None, returnAttachments=True, returnAttachmentDatabyURL=False, returnAsFeatureClass=True, out_path='C:\temp')

print result
# should see something like : {'layers': [{'count': 4, 'id': 0}]}
tpcolson commented 8 years ago

Progress https://services1.arcgis.com/fBc8EJBxQRMcHlei/ArcGIS/rest/services/GRSM_RESTROOMS/FeatureServer

seems to have done the trick. Thanks for looking into it though!