I am trying to update settings on a feature layer that I have published from ArcPro. It appears that I cannot set "Keep track of created and updated features" or "Keep track of who created and last updated features." in Pro. So I have to set these by hand in ArcGIS Online in the layer settings under "Feature Layer (hosted) Settings"
I have to do this for many layers, so it would be great to automate the process. Is this possible in ArcGIS API for Python?
Very useful. I was able to change the "Keep track of who created and last updated features." value with the 'update_definition' call on "enableEditorTracking". However, the properties don't seem to change at all whether "Keep track of created and updated features." is checked or not. Do you know if this property does anything? Is it connected to "enableEditorTracking"?
I don't quite understand what you said. In case you meant: "the web app, will check or uncheck a group of options if one is checked, but the Python API does not do that", then yes, you should expect this. The web app has client side logic to do this. The Python API on the other hand leaves it to you to update the definition of related properties. If you try to perform an unsupported operation, the server will reject it and respond with an error.
I'm attempting to do the same thing through ArcGIS Python API. I succeeded in changing the 'Keep track of who created and last updated features' through an update definition call using the API.
However, I was unable to locate the property that defines Keep track of created and updated features .
What should I do to enable that property?
To get the option ticked in the AGOL interface, "ChangeTracking" needs to be added in the capabilities.
Please be aware that python API is only a wrapper around the REST API, to find the full list of properties supported, you need look into the REST API document which gives you a better chance, it's not guaranteed that you will find all the properties corresponding to the options on the AGOL interface.
According to ESRI document, "If the property does not exist, it's equivalent to having a value of false or not set."
Hope this helps.