When publishing a feature service from a geodatabase, and using the ArcGIS arcis api for python, I can update my capabilities from (default) "Query" to "Query, Sync" with
where flc is my feature layer collection.
However, I have not been able to update to "Create,Delete,Query,Update,Editing,Sync" except through the web application.
Much like I did not change the "Capabilities" values directly to allow for Sync, is there another place I add Create, Delete, and Editing? In the front end I just click the check box "Enable Editing"
Thanks in advance.
Solved! Go to Solution.
I was able to set the hosted view capabilities on create but not with update:
capabilities = "Create,Delete,Query,Update,Editing,Extract,Sync,ChangeTracking"
view_flc = hosted_flc.manager.create_view(name=view_name, allow_schema_changes=True, updateable=True, capabilities=capabilities)
I was able to set the hosted view capabilities on create but not with update:
capabilities = "Create,Delete,Query,Update,Editing,Extract,Sync,ChangeTracking"
view_flc = hosted_flc.manager.create_view(name=view_name, allow_schema_changes=True, updateable=True, capabilities=capabilities)
Laura - that seemed to work... I didn't separate out which of those in the update dictionary made it work, but thanks.
If you grab the update definition request from the web application, the json parameter is:
{"hasStaticData":false,"capabilities":"Query,Editing,Create,Update,Delete","editorTrackingInfo":{"enableEditorTracking":false,"enableOwnershipAccessControl":false,"allowOthersToUpdate":true,"allowOthersToDelete":true,"allowOthersToQuery":true,"allowAnonymousToUpdate":true,"allowAnonymousToDelete":true}}
Since you are not changing the editor tracking you can ignore that, but you do need to change the hasStaticData value to false.
Thanks Rebecca - I will try that
I feel the different API version may behave slightly differently on different GIS platform version.
My case is quite opposite.
flc.manager.update_definition({"capabilities":"Create,Delete,Query,Update,Editing,Sync"})
works, but
flc.manager.update_definition({"syncEnabled":True})
doesn't.
My version is portal 10.6.1, API 1.5.3