Hello all,
I was wondering if there was a way to add GeoJSON data to an existing hosted Feature Layer (https://developers.arcgis.com/layers) programmatically via some sort of REST API or something.
I have been looking around and haven't really been able to find any information about this.
Thanks
Solved! Go to Solution.
If it's en existing hosted featurelayer, you can use applyEdits on the layer, but you need to make sure the attributes schema matches. You could do a little data transformationn, but definitely doable.
If it's en existing hosted featurelayer, you can use applyEdits on the layer, but you need to make sure the attributes schema matches. You could do a little data transformationn, but definitely doable.
Thanks for the info! Is it by chance possible to also create hosted Feature Layers via the API?
Not in the JavaScript API.
Is there a way to do it via any other API like the ArcGIS REST APIs?
Publishing is part of the REST API, but requires an SD file from Pro to publish a layer directly. Other methods are to publish CSV or GeoJSON and create a service from that. Here's some info on using the Python API for publishing https://developers.arcgis.com/python/sample-notebooks/publishing-sd-shapefiles-and-csv/
Thank you so much for all the info! I'll keep looking into this!