First of all, this is a question for the user list, not the devel list, so
you will probably have better luck asking there.

Second, have you looked at the REST docs
<http://docs.geoserver.org/latest/en/user/rest/index.html#rest>? Based on
what I see there, you probably will need to make two requests - first POST
of the configuration to "/workspaces/{workspace}/coveragestores" to create
the store, then second PUT the file to
"/workspaces/{workspace}/coveragestores/{store}/{method}.{format}" to add
the file to the store.
See http://docs.geoserver.org/api/#/1.0.0/coveragestores.yaml for more
details on each of these requests.

Torben

On Mon, Jan 8, 2018 at 7:29 AM, Corina Tudorache via Geoserver-devel <
[email protected]> wrote:

> Hi list,
>
> I have been trying without real success to upload netCDF files in
> GeoServer throungh REST interface. The file contains only one netCDF file,
> without any subsets or bands. So it is a pretty simple netCDF file.
> I have tried the following two methods:
>
> 1) curl -u admin:geoserver -v -POST -H "Content-type: text/xml" -d
> "<coverageStore><name>st</name><workspace>ws</workspace>
> <enabled>true</enable><type>NetCDF</type><url>d:\\path_to_netcdf\\data.nc
> </url></coverageStore>" "http://localhost:8080/
> geoserver/rest/workspaces/ws/coveragestores?configure=all
> <http://localhost:8080/geoserver/rest/workspaces/geonode/coveragestores?configure=all>
> "
>
> I get the following error message:  500 Internal Server Error.
>
>
> 2) curl -v -u admin:geoserver -XPUT -H "Content-type:application/zip"
> --data-binary @d:\\path_to netcdf\\data.zip
> <http://localhost:8080/geoserver/rest/workspaces/ws/coveragestores/st/file.netcdf>
> http://localhost:8080/geoserver/rest/workspaces/ws/
> coveragestores/st/file.netcdf
>
> I get the following error message: 500 Internal Server Error Error
> occured unzipping fileroot
>
> Any ideas or suggestions to solve this issue are more than welcome.
>
> Kind regards,
> Corina
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to