Hello
I'm writing a Python program to publish (append) data to an ArcGIS Online feature layer, every 10 minutes.
I am having issues understanding how to implement the ArcGIS REST API method required to achieve this.
3. I was hoping to mimic these requests, but instead of a .csv file, the data comes from a json string in code.
4. Are addItem, analyse and append all required for this operation?
5. My understanding is that addItem requires a 'file' to be uploaded. Can I get around this by sending the data in the append request? Perhaps as a featureCollection?
This all seems quite complicated, as compared to the updateFeatures method which I have used previously.
Side question, I am querying a variety of sensor data. If I append the sensor data to their ArcGIS Online feature counterparts, will I end up with duplicate features, stacked on top of one another? I only need one feature for each sensor location.
Am I better off not using a feature layer for this task?
Regards
Solved! Go to Solution.
I sort of figured this out, using addFeatures from the ArcGIS Online REST API.
See this thread: Add multiple features in addFeatures API request? (posted by me also!)
Given that ArcGIS API for Python | ArcGIS for Developers is primarily a Python wrapper for the ArcGIS REST API, I suggest you use the ArcGIS API for Python instead of trying to create your own REST calls via HTTP in Python.
I sort of figured this out, using addFeatures from the ArcGIS Online REST API.
See this thread: Add multiple features in addFeatures API request? (posted by me also!)
Would you happen to know how to append attachments to the records?
Thanks!
Carlos