Actually, POST on coverages is supposed to create a new coverage:
From: http://docs.geoserver.org/stable/en/user/rest/api/coverages.html
/workspaces/<ws>/coveragestores/<cs>/coverages[.<format>]
Controls all coverages in a given coverage store and workspace.
Method
Action
Status code
Formats
Default Format
GET
List all coverages in coverage store cs
200
HTML, XML, JSON
HTML
POST
Create a new coverage
201 with Locationheader
XML, JSON
PUT
405
DELETE
405
Once the coverage is created, then you can no longer POST to it, only PUT,
which is shown in the table you pasted in your response.
The error I am getting trying to POST a new coverage (which should be allowed
by the API) is:
500 Internal Server Error
“:Resource native name must not be null”
Thanks,
Scott
From: Bryan Moore [mailto:[email protected]]
Sent: Friday, October 21, 2016 11:35 AM
To: [email protected]
Subject: Re: [Geoserver-devel] Trouble adding coverage through REST
Scott,
However, the second step of adding the coverage, e.g.:
curl -X POST -u admin:geoserver -H "Content-Type: application/json" -d '{
"coverage": {
"name": "rest_test_01"
}
}
'
"http://myhost:8080/geoserver/rest/workspaces/test/coveragestores/rest_test_01/coverages.json"<http://myhost:8080/geoserver/rest/workspaces/test/coveragestores/rest_test_01/coverages.json%22>;
The problem is that POST on coverages as shown in
http://docs.geoserver.org/stable/en/user/rest/api/coverages.html returns a 405
which is "Method not allowed"
GET
Return coveragec
200
HTML, XML, JSON
HTML
quietOnNotFound<http://docs.geoserver.org/stable/en/user/rest/api/coverages.html#rest-api-coverages-quietonnotfound>
POST
405
PUT
Modify coverage c
200
XML,JSON
DELETE
Delete coveragec
200
recurse<http://docs.geoserver.org/stable/en/user/rest/api/coverages.html#rest-api-coverages-recurse>
------------------------------------------------------------------------------
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