This error message is generally received when you attempt to overwrite a service that has had its name changed in ArcGIS Online after publishing. For example, if I publish a service with the name 'A', change the name to 'B', and attempt to overwrite the service using a zipped file geodatabase/shp called 'C', the overwrite will fail.
The overwrite ...
This will not work with a web map, only with a layer. If you're used to ESRI desktop GIS, think of the webmap as the MXD document, you can't export that to a shapefile. But you can export the layers contained within the MXD.
To do that in a webmap, you need to look for the layer names listed on the main part of the page you got the screenshot from. There ...
For anyone else who's looking, here's what I've got to get the alias name based on the field name for any field in your dataset:
// Create a FeatureSet using the appropriate FeatureSetByName/Id
// get all fields (['*']), no gemoetry (false)
var features = FeatureSetById($datastore, /* layer id */ '0', ['*'], false)
var schema_dict = Schema(features);
I managed to get it working by using:
data = fs.createReadStream('../data/test.json')
Then passing data to the file: parameter and removing the multipart: true line. I thought it must be multipart in order to upload a file according to docs. Any light on this would be greatly appreciated.