Hi there,
I have been adding a geodatabase to ArcGIS Online using the ArcGIS API for Python as my geodatabase is too large to publish via out of the box tools in Pro. Then I am publishing using that geodatabase item via the API. I need to be able to retain all the editor tracking info (which you can do out of the box in Pro) but I cannot work out what you have to specify in the publish parameters. I have seen other threads in the community such as this one - Solved: Publishing to AGOL overwrites editor tracking data - Esri Community but I cannot get this line of code to work (as it only seems to be available as in the response in the API documentation):
pub_params = {"editorTrackingInfo" : {"enableEditorTracking":'true', "preserveEditUsersAndTimestamps":'true'}}
Any help would be greatly appreciated!
Joe
Solved! Go to Solution.
I worked this out myself, process below if it helps anyone:
Limitations of current methods for large feature services:
New Method
Step 1
Step 2
Option 1:
Option 2:
item_props = {"type":"Service Definition",
"title":"Insert",
"tags":"Insert",
"description":"Insert",
"commentsEnabled" : False}
uploaded_sd = gis.content.add(item_properties=item_props,data=sd_path,folder="insert")
Step 3
Using ArcGIS API for Python
pub_params = {"editorTrackingInfo" : {"enableEditorTracking":'true', "preserveEditUsersAndTimestamps":'true'}}
source_sd.publish(publish_parameters=pub_params, overwrite="true")
I worked this out myself, process below if it helps anyone:
Limitations of current methods for large feature services:
New Method
Step 1
Step 2
Option 1:
Option 2:
item_props = {"type":"Service Definition",
"title":"Insert",
"tags":"Insert",
"description":"Insert",
"commentsEnabled" : False}
uploaded_sd = gis.content.add(item_properties=item_props,data=sd_path,folder="insert")
Step 3
Using ArcGIS API for Python
pub_params = {"editorTrackingInfo" : {"enableEditorTracking":'true', "preserveEditUsersAndTimestamps":'true'}}
source_sd.publish(publish_parameters=pub_params, overwrite="true")