I am successfully adding a new ImageMosaic of GeoTiffs with the Geoserver REST API

curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file://D:/tifdirectory" "http://localhost:8088/geoserver/rest/workspaces/wsp/coveragestores/tifdirectory/external.imagemosaic"

The .SHP index is then created in my "tifdirectory" along with the "tifdirectory.properties" file and everything works well after I setup the layer parameters directly in Geoserver.

My GeoTIFFs are updated daily, so I need to update the footprint index. I tried with this command:

curl -v -u admin:geoserver -XPOST -H "Content-type: text/plain" -d "file://D:/tifdirectory" "http://localhost:8088/geoserver/rest/workspaces/wsp/coveragestores/tifdirectory/external.imagemosaic"

At first, it seems to work since there is no error in the response, I receive:

* upload completely sent off: 72 out of 72 bytes
< HTTP/1.1 202 Accepted

But my ImageMosaic index (.SHP) is not updated. What am I missing here? Is there another way to update to mosaic index?

I think that I could make it work by deleting the layer and coveragestore daily before creating it back. But, when I create the layer I need to manually edit the parameters in Geoserver UI. How can I create it with cURL with all the parameters (crs, BackgroundValues, SUGGESTED_TILE_SIZE, etc) already set?


1 Answer 1


I have seen this happen before and don't understand why (never debugged the source all the way through GeoServer & GeoTools).

Try specifically adding each new image instead of just giving it the directory. That was a viable workaround for the issue the last time I saw this happen on my home PC.

curl -v -u username:password -XPOST -H "Content-type: text/plain" \
 -d "file://D:/tifdirectory/YOUR_IMAGE.tif" \

Your Answer

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

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