I am trying to automate the geoserver configuration process and I am using curl and the geoserver REST API.
I am able to create workspaces and for instance a WMS datastore, but I am not able to create an image pyramid datastore.
Is this possible at all?
I haven't found any examples online. I have tried the suggestion from Creating Store in GeoServer workspace using REST API?. I tried to get information from another datastore and modifying the result to post it again. I created a file using statement below:
curl -v -u username:password -XGET -H 'Accept:text/xml' http://myserver:8080/geoserver/rest/workspaces/workspacename/coveragestores/datastorename_X/ > logfile.log
I modified the name and path of the coverage store and tried to upload it again using:
curl -v -u username:password -XPUT -H 'Accept:text/xml' -H 'Content-type:text/xml' -d @logfile.log http://myserver:8080/geoserver/rest/workspaces/workspacename/coveragestores/datastorename_Y/
< HTTP/1.1 500 Internal Server Error
< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Tue, 18 Apr 2017 13:20:19 GMT
< Connection: close
<
coverages : coverages : coverages : coverages
---- Debugging information ----
message : coverages : coverages
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : coverages : coverages
class : org.geoserver.catalog.impl.CoverageStoreInfoImpl
required-type : org.geoserver.catalog.impl.CoverageStoreInfoImpl
line number : 1
* Closing connection #0