While trying to update an existing ImageMosaic in GeoServer using the REST API, following the documentation (provided here http://docs.geoserver.org/stable/en/user/rest/examples/curl.html#uploading-and-modifying-a-image-mosaic)
using the following command
curl -u admin:geoserver -XPOST -H "Content-type: text/plain" -d "file:///path/to/file/img.tiff" "http://localhost:8080/geoserver/rest/workspaces/opengeo/coveragestores/klicfinal/external.imagemosaic"
I get an empty response, while my ImageMosaic remains un-updated. Does anyone have a clue as to what could be causing this?
EDIT: I've already tried using the recalculate parameter. Furthermore, after closer examination, the shapefile of the imagemosaic has been updated and already shows the location and the reference to the new geotiff file. However, the newly added image does not show up in the WMS layer preview, even after disabling caching.
Even the GML that you can get using http://localhost:8080/geoserver/rest/workspaces/opengeo/coveragestores/klicfinal/coverages/klicfinal/index/granules.xml?
shows the updated reference to the newly uploaded GeoTIFF.
Hostname was NOT found in DNS cache
Trying 127.0.0.1...
Connected to localhost (127.0.0.1) port 8080 (#0)
Server auth using Basic with user 'admin'
POST /geoserver/rest/workspaces/opengeo/coveragestores/klicfinal/external.imagemosaic HTTP/1.1
Authorization: Basic YWRtaW46Z2Vvc2VydmVy
User-Agent: curl/7.35.0
Host: localhost:8080
Accept: */*
Content-type: text/plain
Content-Length: 83
upload completely sent off: 83 out of 83 bytes
HTTP/1.1 202 Accepted
Date: Tue, 11 Apr 2017 14:33:17 GMT
Server Noelios-Restlet-Engine/1.0..8 is not blacklisted
Server: Noelios-Restlet-Engine/1.0..8
Transfer-Encoding: chunked
Connection #0 to host localhost left intact