I previously asked Adding data to a feature layer on ArcGIS Online using arcrest and arcresthelper.featureservicetools? regarding the most current process for establishing and then automating feature updates on ArcGIS Online using the ArcGIS Python API. I can successfully add shapefiles to my portal content and publish them as a feature layers. However, I would like to get into the details of constructing the "publish_parameters" argument for the publish method described here: arcgis.gis.GIS content.publish() I'm not sure if the docs are incomplete, but using the supplied link for understanding the publish parameters dictionary leads you to the ArcGIS REST API which describes using JSON objects for the publish parameters. This seems to be misguided as this is not a Python API and nowhere else can I find how to construct the publish_parameters dictionary for Python.
The reason this is an issue is because some of my field types need to be specified in the published data. I have some UID fields that are all numbers but for a reason I won't get into here, I need them to be treated as text, which seems possible if able to leverage the publish_parameters argument. This is one example of many of how I would like to take more control of how the publishing action gets handled.
Does anyone know of a resource that explicitly describes the publishing process for CSV and/or zipped Shapefiles that details the publish_parameters argument of the publish method or am I missing something else that allows control over this (besides manually changing the way fields are displayed in the portal)?
Edit: My original question regarding the publish_parameters argument was not the correct approach at all. There is no need to construct the publish_parameters argument. Local features can be converted to JSON and then pushed to AGOL using the ArcGIS Python API. This allows for local features to take the place of hosted features. This guide helped me a lot in ironing out this process.