I tried to upload a zipped shapefile to GeoServer using CURL.
curl -v -u username:password -XPUT -H "Content-type: application/zip" --data-binary @D:\curl\bin\roads.zip https://DOMAIN/geoserver/rest/workspaces/geonode/datastores/my_geonode_data/file.shp
This above command works fine.
But I can't seem to upload a GeoJSON file to GeoServer.
curl -v -u username:password -XPUT -H "Content-type: application/json" --data-binary @D:\curl\bin\countries.geojson https://DOMAIN/geoserver/rest/workspaces/geonode/datastores/my_geonode_data/featuretypes
I am attaching the error in geoserver.log. But the GeoJSON is not uploaded. I can't see it in the uploaded layers. Am I correct in the CURL command? Is the endpoint (URL address) okay?