I want to create an MBTiles datastore using the REST API of GeoServer.
I was able to create a datastore for a shapefile using:
curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain"
-d "file:///data/shapefiles/rivers/rivers.shp"
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/rivers/external.shp
I didn't find any example for MBTiles files. So, I tried the following (after adding the MBTiles extension to my GeoServer):
curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain"
-d "file:///data/path/to/mbtiles/file.mbtiles"
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/rivers/external.mbtiles
But got the following return code:
400 Unsupported format: mbtiles
Can any body help me with the right way or a turn around way.