On Mon, Apr 22, 2013 at 4:44 PM, Sandor Csaba <sandor.cs...@viamap.hu>wrote:

> Hi List,
>
> Being new to using the REST API I would like to ask you how to create a
> nested layergroup through the REST API?
>
> My curl is:
> curl -v -u user:pwd -XPOST -H 'Content-type: text/xml' -d
> "<layerGroup><name>2013</name><title>2013</title><mode>CONTAINER</mode><layers><layer>201304</layer></layers></layerGroup>"
> http://localhost:8080/geoserver/rest/workspaces/myworkspace/layergroups
>
> Where "2013" is the new layerGroup and "201304" is an existing layerGroup.
>
> I could successfully create a layerGroup consisting of plain layers.
>

The general advice when you are looking at some REST construct that lacks
documentation is
simple, and always the same:
- configure what you need in the GUI
- use GET requests to gather the resources you modified and look at their
structure
- repeat it with your REST api calls

Cheers
Andrea


-- 
==
GeoServer training in Milan, 6th & 7th June 2013!  Visit
http://geoserver.geo-solutions.it for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to