I want to automate the updating of the CSV files my surveys use. But I cannot find a way to do the equivalent of pushing update data button in the online portal via script. Using either the REST interface directly or the python SDK I can download the CSV, but I can't find a method to replace it with new data.
I could delete it, and upload a new copy, but that will have a new ID and I'm pretty certain it's not going to be linked to my surveys. I've looked into adding a link to the new ID as linked content on the surveys via python, but that also looks to be a dead end and not available.
Hoping I'm just missing something and there is a way to do this. Any advice would be greatly appreciated.
Solved! Go to Solution.
Hi Duncan,
I run a daily python script to update a csv that I reference in one of my surveys in Survey123. I also only use AGOL not enterprise.
The steps I follow are:
1. re-create the csv locally exactly how it is in AGOL so that you can use the update method on the csv in AGOL
2. run the following script
Hi @DuncanC
my colleague is using FME Flow - maybe here is a good starting point: https://community.esri.com/t5/arcgis-data-interoperability-blog/how-fme-flow-or-form-can-write-to-ar...
Thanks for the suggestion.
I should have mentioned I'm using AGOL not a enterprise install so I don't think that solution works.
if you have the FME possibility there is an AGOL connector as well: https://support.safe.com/hc/en-us/articles/25407563623565-How-to-use-the-EsriArcGISOnlineConnector
I'm not interested in the FME part, but if their connector can do what it claims it give me hope that what I want is indeed possible, I just need to find the correct REST endpoint.
Hi Duncan,
I run a daily python script to update a csv that I reference in one of my surveys in Survey123. I also only use AGOL not enterprise.
The steps I follow are:
1. re-create the csv locally exactly how it is in AGOL so that you can use the update method on the csv in AGOL
2. run the following script
Thank you very much!! Not sure how I missed that earlier today but your script helped me find the update method I need.
https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.update