1

I have published a GeoTIFF image to a GeoServer coveragestore as a layer.

In order to delete the layer I had to run the following two cURL commands:

curl -v -u admin:geoserver -XDELETE http://localhost:8090/geoserver/rest/layers/{WORKSPACE}:{LAYER}.xml

curl -v -u admin:geoserver -XDELETE http://localhost:8090/geoserver/rest/workspaces/{WORKSPACE}/coveragestores/{COVERAGESTORE}/coverages/{COVERAGE}.xml

I was unable to find any documentation regarding deleting a coverage on GeoServer, so I am wondering if it's possible to just run one command to complete the coverage delete via GeoServer REST.

  • 2
    I don't think it's possible. Why do you need it in one command ? – pLumo Aug 8 '17 at 7:02
1

You can use the following ?recurse=true to delete the contain of the store:

curl -v -u admin:geoserver -XDELETE http://localhost:8090/geoserver/rest/workspaces/{WORKSPACE}/coveragestores/{COVERAGESTORE}/coverages/{COVERAGE}.xml?recurse=true
New contributor
kovacszoli88.geo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.