--- swagger: '2.0' info: version: 1.0.0 title: GeoServer Layer Groups description: 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. contact: name: GeoServer email: 'geoserver-users@osgeo.org' url: 'https://geoserver.org/comm/' host: localhost:8080 basePath: /geoserver/rest paths: /layergroups: get: operationId: getLayergroups tags: - "LayerGroups" summary: Get a list of layer groups description: 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) produces: - application/xml - application/json - text/html responses: 200: description: OK schema: $ref: "#/definitions/LayergroupResponse" examples: application/xml: | spearfish 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"}]}} post: operationId: postLayergroups tags: - "LayerGroups" summary: Add a new layer group description: Adds a new layer group entry to the server. parameters: - name: layergroupBody description: The layer group body information to upload. in: body required: true schema: $ref: "#/definitions/Layergroup" consumes: - application/xml - application/json responses: 201: description: Created schema: type: string headers: Location: description: URL where the newly created layer group can be found type: string put: operationId: putLayergroups tags: - "LayerGroups" description: Invalid. Use POST for adding a new layer group, or PUT on /layergroups/{layergroup} to edit an existing layer group. responses: 405: description: Method Not Allowed delete: operationId: deleteLayergroups tags: - "LayerGroups" description: Invalid. Use /layergroups/{layergroup} instead. responses: 405: description: Method Not Allowed /layergroups/{layergroupName}: get: operationId: getLayergroup tags: - "LayerGroups" summary: Retrieve a layer group description: 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). produces: - application/xml - application/json - text/html parameters: - name: layergroupName in: path required: true description: The name of the layer group to retrieve. type: string responses: 200: description: OK schema: $ref: "#/definitions/Layergroup" examples: application/xml: | spearfish SINGLE Spearfish Spearfish City in Lawrence County, South Dakota sfdem streams