GeoServer Layer Groups
A layer group is a group of layers that can be referenced as a single layer as part of a WMS request. A layer group can also be used as a container for layers.
Version: 1.0.0
BasePath:/geoserver/rest
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
Up
delete /layergroups/{layergroupName}
Delete layer group (deleteLayergroup)
Deletes a layer group from the server.
Path parameters
layergroupName (required)
Path Parameter — The name of the layer group to delete.
Responses
200
OK
(deleteLayergroups)
Invalid. Use /layergroups/{layergroup} instead.
Responses
405
Method Not Allowed
Up
delete /workspaces/{workspace}/layergroups/{layergroup}
Delete layer group (deleteWorkspaceLayergroup)
Deletes a layer group from the server in the given workspace.
Path parameters
layergroup (required)
Path Parameter — The name of the layer group to delete.
workspace (required)
Path Parameter — The name of the workspace
Responses
200
OK
Up
delete /workspaces/{workspace}/layergroups
(deleteWorkspaceLayergroups)
Invalid. Use /workspaces/{workspace}/layergroups/{layergroup} instead.
Responses
405
Method Not Allowed
Up
get /layergroups/{layergroupName}
Retrieve a layer group (getLayergroup)
Retrieves a single layer group definition. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layergroups/{layergroup}.xml" for XML).
Path parameters
layergroupName (required)
Path Parameter — The name of the layer group to retrieve.
Return type
Example data
Content-Type: application/xml
"\n spearfish\n SINGLE\n Spearfish\n Spearfish City in Lawrence County, South Dakota\n \n \n sfdem\n \n \n \n streams\n \n \n \n \n \n \n 589425.9342365642\n 609518.6719560538\n 4913959.224611808\n 4928082.949945881\n EPSG:26713\n \n \n \n \n \n keyword1\\@language=en\\;\\@vocabulary=vocabulary1\\;\n keyword2\\@language=pt\\;\\@vocabulary=vocabulary2\\;\n \n\n"
Example data
Content-Type: application/json
"{\"layerGroup\": { \n \"name\":\"spearfish\",\n \"mode\":\"SINGLE\",\n \"title\":\"Spearfish\",\n \"abstractTxt\":\"Spearfish City in Lawrence County, South Dakota\",\n \"publishables\":{\"published\":[\n {\"@type\":\"layer\",\n \"name\":\"sfdem\",\n \"href\":\"http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.json\"},\n {\"@type\":\"layer\",\n \"name\":\"streams\",\n \"href\":\"http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.json\"}]},\n \"styles\": {\"style\":[\n {\"name\":\"dem\",\n \"href\":\"http://localhost:8080/geoserver/rest/styles/dem.json\"},\n \"null\"]},\n \"bounds\": { \"minx\":589425.9342365642,\n \"maxx\":609518.6719560538,\n \"miny\":4913959.224611808,\n \"maxy\":4928082.949945881,\n \"crs\":{\"@class\":\"projected\",\"$\":\"EPSG:26713\"}},\n \"metadata\":{\"entry\":{\"@key\":\"rawStyleList\",\"$\":\"\"}}\n }\n}\n"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
application/xml
application/json
text/html
Responses
200
OK
Layergroup
Example data
Content-Type: application/xml
spearfish
SINGLE
Spearfish
Spearfish City in Lawrence County, South Dakota
sfdem
streams
589425.9342365642
609518.6719560538
4913959.224611808
4928082.949945881
EPSG:26713
keyword1\@language=en\;\@vocabulary=vocabulary1\;
keyword2\@language=pt\;\@vocabulary=vocabulary2\;
Example data
Content-Type: application/json
{"layerGroup": {
"name":"spearfish",
"mode":"SINGLE",
"title":"Spearfish",
"abstractTxt":"Spearfish City in Lawrence County, South Dakota",
"publishables":{"published":[
{"@type":"layer",
"name":"sfdem",
"href":"http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.json"},
{"@type":"layer",
"name":"streams",
"href":"http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.json"}]},
"styles": {"style":[
{"name":"dem",
"href":"http://localhost:8080/geoserver/rest/styles/dem.json"},
"null"]},
"bounds": { "minx":589425.9342365642,
"maxx":609518.6719560538,
"miny":4913959.224611808,
"maxy":4928082.949945881,
"crs":{"@class":"projected","$":"EPSG:26713"}},
"metadata":{"entry":{"@key":"rawStyleList","$":""}}
}
}
Get a list of layer groups (getLayergroups)
Displays a list of all layer groups on the server not otherwise in a workspace. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layergroups.xml" for XML)
Return type
Example data
Content-Type: application/xml
"\n \n spearfish\n \n \n\n"
Example data
Content-Type: application/json
"{\"layerGroups\":{\"layerGroup\":[{\"name\":\"spearfish\",\"href\":\"http:\\/\\/localhost:8080\\/geoserver\\/rest\\/layergroups\\/spearfish.json\"},{\"name\":\"tasmania\",\"href\":\"http:\\/\\/localhost:8080\\/geoserver\\/rest\\/layergroups\\/tasmania.json\"},{\"name\":\"tiger-ny\",\"href\":\"http:\\/\\/localhost:8080\\/geoserver\\/rest\\/layergroups\\/tiger-ny.json\"}]}}\n"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
application/xml
application/json
text/html
Responses
200
OK
LayergroupResponse
Example data
Content-Type: application/xml
spearfish
Example data
Content-Type: application/json
{"layerGroups":{"layerGroup":[{"name":"spearfish","href":"http:\/\/localhost:8080\/geoserver\/rest\/layergroups\/spearfish.json"},{"name":"tasmania","href":"http:\/\/localhost:8080\/geoserver\/rest\/layergroups\/tasmania.json"},{"name":"tiger-ny","href":"http:\/\/localhost:8080\/geoserver\/rest\/layergroups\/tiger-ny.json"}]}}
Up
get /workspaces/{workspace}/layergroups/{layergroup}
Retrieve a layer group (getWorkspaceLayergroup)
Retrieves a single layer group definition. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/layergroups/{layergroup}.xml" for XML).
Path parameters
workspace (required)
Path Parameter — The name of the workspace
layergroup (required)
Path Parameter — The name of the layer group to retrieve.
Return type
Example data
Content-Type: application/json
"{\"layerGroup\":{\"name\":\"spearfish\",\"mode\":\"SINGLE\",\"title\":\"Spearfish\",\"abstractTxt\":\"Spearfish City in Lawrence County, South Dakota\",\"workspace\":{\"name\":\"sf\"},\"publishables\":{\"published\":[{\"@type\":\"layer\",\"name\":\"sfdem\",\"href\":\"http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.json\"},{\"@type\":\"layer\",\"name\":\"streams\",\"href\":\"http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.json\"}]},\"styles\":{\"style\":[{\"name\":\"dem\",\"href\":\"http://localhost:8080/geoserver/rest/styles/dem.json\"},\"null\"]},\"bounds\":{\"minx\":589425.9342365642,\"maxx\":609518.6719560538,\"miny\":4913959.224611808,\"maxy\":4928082.949945881,\"crs\":{\"@class\":\"projected\",\"$\":\"EPSG:26713\"}},\"metadata\":{\"entry\":{\"@key\":\"rawStyleList\",\"$\":\"\"}}}}\n"
Example data
Content-Type: application/xml
"\n spearfish\n SINGLE\n Spearfish\n Spearfish City in Lawrence County, South Dakota\n \n sf\n \n \n \n sfdem\n \n \n \n streams\n \n \n \n \n \n \n 589425.9342365642\n 609518.6719560538\n 4913959.224611808\n 4928082.949945881\n EPSG:26713\n \n \n \n \n \n"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
application/xml
application/json
text/html
Responses
200
OK
Layergroup
Example data
Content-Type: application/json
{"layerGroup":{"name":"spearfish","mode":"SINGLE","title":"Spearfish","abstractTxt":"Spearfish City in Lawrence County, South Dakota","workspace":{"name":"sf"},"publishables":{"published":[{"@type":"layer","name":"sfdem","href":"http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.json"},{"@type":"layer","name":"streams","href":"http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.json"}]},"styles":{"style":[{"name":"dem","href":"http://localhost:8080/geoserver/rest/styles/dem.json"},"null"]},"bounds":{"minx":589425.9342365642,"maxx":609518.6719560538,"miny":4913959.224611808,"maxy":4928082.949945881,"crs":{"@class":"projected","$":"EPSG:26713"}},"metadata":{"entry":{"@key":"rawStyleList","$":""}}}}
Example data
Content-Type: application/xml
spearfish
SINGLE
Spearfish
Spearfish City in Lawrence County, South Dakota
sf
sfdem
streams
589425.9342365642
609518.6719560538
4913959.224611808
4928082.949945881
EPSG:26713
Up
get /workspaces/{workspace}/layergroups
Get a list of layer groups in a workspace (getWorkspaceLayergroups)
Displays a list of all layer groups in a given workspace. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layergroups.xml" for XML).
Path parameters
workspace (required)
Path Parameter — The name of the workspace
Return type
Example data
Content-Type: application/xml
" spearfish "
Example data
Content-Type: application/json
" {\"layerGroups\":{\"layerGroup\":[{\"name\":\"spearfish\",\"href\":\"http:\\/\\/localhost:8080\\/geoserver\\/rest\\/workspaces\\/sf\\/layergroups\\/spearfish.json\"}]}} "
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
application/xml
application/json
text/html
Responses
200
OK
LayergroupResponse
Example data
Content-Type: application/xml
spearfish
Example data
Content-Type: application/json
{"layerGroups":{"layerGroup":[{"name":"spearfish","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/sf\/layergroups\/spearfish.json"}]}}
Up
post /layergroups/{layergroupName}
(postLayergroup)
Invalid. Use PUT to edit a layer group definition, or POST with /layergroups to add a new definition.
Responses
405
Method Not Allowed
Add a new layer group (postLayergroups)
Adds a new layer group entry to the server.
Consumes
This API call consumes the following media types via the request header:
application/xml
application/json
Request body
Body Parameter — The layer group body information to upload.
Return type
String
Example data
Content-Type: application/json
""
Responses
201
Created
String
Up
post /workspaces/{workspace}/layergroups/{layergroup}
(postWorkspaceLayergroup)
Invalid. Use PUT to edit a layer group definition, or POST with /workspaces/{workspace}/layergroups to add a new definition.
Responses
405
Method Not Allowed
Up
post /workspaces/{workspace}/layergroups
Add a new layer group (postWorkspaceLayergroups)
Adds a new layer group entry to the server in the specified workspace.
Consumes
This API call consumes the following media types via the request header:
application/xml
application/json
Request body
Body Parameter — The layer group body information to upload.
Return type
String
Example data
Content-Type: application/json
""
Responses
201
Created
String
Up
put /layergroups/{layergroupName}
Modify a layer group. (putLayergroup)
Modifies an existing layer group on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layergroups/{layergroup}.xml" for XML).
Path parameters
layergroupName (required)
Path Parameter — The name of the layer group to modify.
Consumes
This API call consumes the following media types via the request header:
application/xml
application/json
Request body
Body Parameter — The updated layer group definition.
Responses
200
The layer group was successfully updated.
(putLayergroups)
Invalid. Use POST for adding a new layer group, or PUT on /layergroups/{layergroup} to edit an existing layer group.
Responses
405
Method Not Allowed
Up
put /workspaces/{workspace}/layergroups/{layergroup}
Modify a layer group. (putWorkspaceLayergroup)
Modifies an existing layer group on the server in the given workspace. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/workspaces/{workspace}/layergroups/{layergroup}.xml" for XML).
Path parameters
workspace (required)
Path Parameter — The name of the workspace
layergroup (required)
Path Parameter — The name of the layer group to modify.
Consumes
This API call consumes the following media types via the request header:
application/xml
application/json
Request body
Body Parameter — The updated layer group definition.
Responses
200
The layer group was successfully updated.
Up
put /workspaces/{workspace}/layergroups
(putWorkspaceLayergroups)
Invalid. Use POST for adding a new layer group to a workspace, or PUT on /workspaces/{workspace}/layergroups/{layergroup} to edit an existing layer group.
Responses
405
Method Not Allowed
[ Jump to Methods ]
Table of Contents
Layergroup
- layerGroup
LayergroupMetadataLink
- metadataLink
LayergroupPublished
- layer
LayergroupResponse
- layerGroups
LayergroupStyle
- style
Layergroup_bounds
-
Layergroup_keywords
-
Layergroup_publishables
-
Layergroup_styles
-
Layergroup_workspace
-
Layergroups
- layerGroup
name (optional)
String Name of the layer group
mode (optional)
String Name of the layer group mode. Can be SINGLE, NAMED, CONTAINER, or EO.
SINGLE
NAMED
CONTAINER
EO
title (optional)
String Title of the layer group
abstractTxt (optional)
String Abstract of the layer group
workspace (optional)
publishables (optional)
styles (optional)
metadataLinks (optional)
bounds (optional)
keywords (optional)
type (optional)
metadataType (optional)
String Metadata type. Can be ISO9115:2003, FGDC, TC211, 19139, or other.
content (optional)
name (optional)
String Name of the comprising layer, or empty to indicate a style group defined by the corresponding style.
link (optional)
String URL to the comprising layer
Style to use to render layer
name (optional)
String Name of the style for the corresponding layer in the list, or empty to use the default style of the corresponding layer.
link (optional)
String URL of the style for the corresponding layer in the list
minx (optional)
maxx (optional)
miny (optional)
maxy (optional)
crs (optional)
String CRS code, usually in the form EPSG:####
A collection of keywords associated with the resource.
keyword (optional)
array[String] List of keyword values with internationalization and vocabulary
Layers published by group (in draw order)
Styles used to render layers in group
name (optional)
String Name of workspace that contains the layer group. Will only exist when request includes workspace name (/workspaces/{workspace}/...).
name (optional)
link (optional)
String URL to layer group definition