[Geoserver-users] rest api for wmsstore or wmslayer

Hi Allen

Is there a rest api for wmsstore or wmslayer? I don’t think there is a page for it in the Geoserver documentation. I thought it would work the same as normal stores and featuretype/coverages and I was able to add a wmsstore with xml but that’s it. Can’t modify or delete wmsstore or even add wmslayer.

Allen

Hi,

I don’t know if there are special limitations for WMS stores in REST or not but you can read this Stackexchange question http://gis.stackexchange.com/questions/112599/geoserver-datastore-property-update-via-rest-api/112612#112612. Use it as an example and send us the complete REST requests which you used so that we can repeat everything by copy-paste. Use localhost:8080 as host and http://demo.opengeo.org/geoserver/wms as WMS and topp:states as layer to cascade.

-Jukka Rahkonen-


Allen Huang wrote:

Is there a rest api for wmsstore or wmslayer? I don’t think there is a page for it in the Geoserver documentation. I thought it would work the same as normal stores and featuretype/coverages and I was able to add a wmsstore with xml but that’s it. Can’t modify or delete wmsstore or even add wmslayer.

Allen

Thank for replying

I uses python and the httplib library and not cURL and this is what I did.
This is what I use the setup wms store. This got this part by imitating the xml that create datastore from postgis. Creating wms store. This will create a wms store

XML

aWMSstore
WMS
true

http://demo.opengeo.org/geoserver/wms ?request=GetCapabilites
username
password

true

6
30
60

the REST url using http POST method
http://localhost:8080/geoserver/rest/workspaces/topp/wmsstores.xml

Now, this is what I did to create wms layer. This didn’t work

XML

states states true

EPSG:4326
EPSG:4326
FORCE_DECLARED

states features

the REST url using http POST method

http://localhost:8080/geoserver/rest/workspaces/topp/wmsstores/aWMSstore/wmslayers.xml

This is exactly what I did. Pretty standard. Hope you have better luck than me.

Allen

On Saturday, September 6, 2014 1:27 AM, Rahkonen Jukka (Tike) jukka.rahkonen@anonymised.com wrote:

Hi,

I don’t know if there are special limitations for WMS stores in REST or not but you can read this Stackexchange question http://gis.stackexchange.com/questions/112599/geoserver-datastore-property-update-via-rest-api/112612#112612. Use it as an example and send us the complete REST requests which you used so that we can repeat everything by copy-paste. Use localhost:8080 as host and http://demo.opengeo.org/geoserver/wms as WMS and topp:states as layer to cascade.

-Jukka Rahkonen-


Allen Huang wrote:

Is there a rest api for wmsstore or wmslayer? I don’t think there is a page for it in the Geoserver documentation. I thought it would work the same as normal stores and featuretype/coverages and I was able to add a wmsstore with xml but that’s it. Can’t modify or delete wmsstore or even add wmslayer.

Allen