I need to change parameters (Input Transparent Color) from layers in GeoServer. I have a lot of images to do it. So, I need to do this edit using GeoServer REST API.

I did the code below but it doesn't work.

curl -u admin:geoserver -v -XPUT -H "Content-type: text/xml" -d "<coverage><parameters><entry><string>*InputTransparentColor*</string><string>000000</string></entry></parameters><enabled>true</enabled></coverage>" http://localhost:$81/geoserver/rest/workspaces/sentinel2/coveragestores/$covareganame/coverages/$covareganame.xml

Is it possible to change layer's parameters from the curl commands? What's wrong in my script it not change input transparent color to '00000'?

1 Answer 1


The answer is:

curl -u admin:geoserver -XPUT -H "Content-Type: text/xml" -d "<coverage><parameters><entry><string>InputTransparentColor</string><string>#000000</string></entry></parameters></coverage>"  http://$IP:PORT/geoserver/rest/workspaces/$WORKSPACENAME/coveragestores/$RESOURCENAME/coverages/LAYERNAME.xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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