123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562 |
- ---
- 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: |
- <layerGroups>
- <layerGroup>
- <name>spearfish</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/layergroups/spearfish.xml" type="application/xml"/>
- </layerGroup>
- </layerGroups>
-
- 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: |
- <layerGroup>
- <name>spearfish</name>
- <mode>SINGLE</mode>
- <title>Spearfish</title>
- <abstractTxt>Spearfish City in Lawrence County, South Dakota</abstractTxt>
- <publishables>
- <published type="layer">
- <name>sfdem</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.xml" type="application/xml"/>
- </published>
- <published type="layer">
- <name>streams</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.xml" type="application/xml"/>
- </published>
- </publishables>
- <styles>
- <style>
- <name>dem</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/dem.xml" type="application/xml"/>
- <style/>
- </styles>
- <bounds>
- <minx>589425.9342365642</minx>
- <maxx>609518.6719560538</maxx>
- <miny>4913959.224611808</miny>
- <maxy>4928082.949945881</maxy>
- <crs class="projected">EPSG:26713</crs>
- </bounds>
- <metadata>
- <entry key="rawStyleList"></entry>
- </metadata>
- <keywords>
- <keyword>keyword1\@language=en\;\@vocabulary=vocabulary1\;</keyword>
- <keyword>keyword2\@language=pt\;\@vocabulary=vocabulary2\;</keyword>
- </keywords>
- </layerGroup>
-
- 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","$":""}}
- }
- }
-
- post:
- operationId: postLayergroup
- tags:
- - "LayerGroups"
- description: Invalid. Use PUT to edit a layer group definition, or POST with /layergroups to add a new definition.
- responses:
- 405:
- description: Method Not Allowed
- put:
- operationId: putLayergroup
- tags:
- - "LayerGroups"
- summary: Modify a layer group.
- description: 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).
- parameters:
- - name: layergroupName
- in: path
- required: true
- description: The name of the layer group to modify.
- type: string
- - name: layergroupBody
- in: body
- description: The updated layer group definition.
- required: true
- schema:
- $ref: "#/definitions/Layergroup"
- consumes:
- - application/xml
- - application/json
- responses:
- 200:
- description: The layer group was successfully updated.
- delete:
- operationId: deleteLayergroup
- tags:
- - "LayerGroups"
- summary: Delete layer group
- description: Deletes a layer group from the server.
- parameters:
- - name: layergroupName
- in: path
- required: true
- description: The name of the layer group to delete.
- type: string
- responses:
- 200:
- description: OK
- /workspaces/{workspace}/layergroups:
- get:
- operationId: getWorkspaceLayergroups
- tags:
- - "LayerGroups"
- summary: Get a list of layer groups in a workspace
- description: 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).
- produces:
- - application/xml
- - application/json
- - text/html
- parameters:
- - $ref: "#/parameters/Workspace"
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/LayergroupResponse"
- examples:
- application/xml: '
- <layerGroups>
- <layerGroup>
- <name>spearfish</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/sf/layergroups/spearfish.xml" type="application/xml"/>
- </layerGroup>
- </layerGroups>
- '
- application/json: '
- {"layerGroups":{"layerGroup":[{"name":"spearfish","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/sf\/layergroups\/spearfish.json"}]}}
- '
- post:
- operationId: postWorkspaceLayergroups
- tags:
- - "LayerGroups"
- summary: Add a new layer group
- description: Adds a new layer group entry to the server in the specified workspace.
- 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: putWorkspaceLayergroups
- tags:
- - "LayerGroups"
- description: 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:
- description: Method Not Allowed
- delete:
- operationId: deleteWorkspaceLayergroups
- tags:
- - "LayerGroups"
- description: Invalid. Use /workspaces/{workspace}/layergroups/{layergroup} instead.
- responses:
- 405:
- description: Method Not Allowed
- /workspaces/{workspace}/layergroups/{layergroup}:
- get:
- operationId: getWorkspaceLayergroup
- 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 "/workspaces/{workspace}/layergroups/{layergroup}.xml" for XML).
- produces:
- - application/xml
- - application/json
- - text/html
- parameters:
- - $ref: "#/parameters/Workspace"
- - name: layergroup
- 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/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","$":""}}}}
-
- application/xml: |
- <layerGroup>
- <name>spearfish</name>
- <mode>SINGLE</mode>
- <title>Spearfish</title>
- <abstractTxt>Spearfish City in Lawrence County, South Dakota</abstractTxt>
- <workspace>
- <name>sf</name>
- </workspace>
- <publishables>
- <published type="layer">
- <name>sfdem</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.xml" type="application/xml"/>
- </published>
- <published type="layer">
- <name>streams</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.xml" type="application/xml"/>
- </published>
- </publishables>
- <styles>
- <style>
- <name>dem</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/dem.xml" type="application/xml"/>
- <style/>
- </styles>
- <bounds>
- <minx>589425.9342365642</minx>
- <maxx>609518.6719560538</maxx>
- <miny>4913959.224611808</miny>
- <maxy>4928082.949945881</maxy>
- <crs class="projected">EPSG:26713</crs>
- </bounds>
- <metadata>
- <entry key="rawStyleList"></entry>
- </metadata>
- </layerGroup>
- post:
- operationId: postWorkspaceLayergroup
- tags:
- - "LayerGroups"
- description: Invalid. Use PUT to edit a layer group definition, or POST with /workspaces/{workspace}/layergroups to add a new definition.
- responses:
- 405:
- description: Method Not Allowed
- put:
- operationId: putWorkspaceLayergroup
- tags:
- - "LayerGroups"
- summary: Modify a layer group.
- description: 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).
- parameters:
- - $ref: "#/parameters/Workspace"
- - name: layergroup
- in: path
- required: true
- description: The name of the layer group to modify.
- type: string
- - name: layergroupBody
- in: body
- description: The updated layer group definition.
- required: true
- schema:
- $ref: "#/definitions/Layergroup"
- consumes:
- - application/xml
- - application/json
- responses:
- 200:
- description: The layer group was successfully updated.
- delete:
- operationId: deleteWorkspaceLayergroup
- tags:
- - "LayerGroups"
- summary: Delete layer group
- description: Deletes a layer group from the server in the given workspace.
- parameters:
- - name: layergroup
- in: path
- required: true
- description: The name of the layer group to delete.
- type: string
- - $ref: "#/parameters/Workspace"
- responses:
- 200:
- description: OK
- parameters:
- Workspace:
- name: workspace
- type: string
- in: path
- description: The name of the workspace
- required: true
-
- definitions:
- LayergroupResponse:
- title: layerGroups
- type: object
- properties:
- layerGroups:
- $ref: "#/definitions/Layergroups"
- Layergroups:
- title: layerGroup
- type: object
- properties:
- name:
- type: string
- description: Name of layer group
- link:
- type: string
- description: URL to layer group definition
- Layergroup:
- title: layerGroup
- xml:
- name: layerGroup
- type: object
- properties:
- name:
- type: string
- description: Name of the layer group
- mode:
- type: string
- enum:
- - SINGLE
- - NAMED
- - CONTAINER
- - EO
- description: Name of the layer group mode. Can be SINGLE, NAMED, CONTAINER, or EO.
- title:
- type: string
- description: Title of the layer group
- abstractTxt:
- type: string
- description: Abstract of the layer group
- workspace:
- type: object
- properties:
- name:
- type: string
- description: Name of workspace that contains the layer group. Will only exist when request includes workspace name (/workspaces/{workspace}/...).
- publishables:
- type: object
- description: Layers published by group (in draw order)
- properties:
- published:
- type: array
- description: Published layer
- items:
- $ref: "#/definitions/LayergroupPublished"
- styles:
- type: object
- description: Styles used to render layers in group
- properties:
- style:
- description: Style to render layer, or empty to use default style.
- type: array
- items:
- $ref: "#/definitions/LayergroupStyle"
- metadataLinks:
- type: array
- items:
- $ref: "#/definitions/LayergroupMetadataLink"
- bounds:
- type: object
- properties:
- minx:
- type: number
- description: Minimum X value of bounds
- maxx:
- type: number
- description: Maximum X value of bounds
- miny:
- type: number
- description: Minimum Y value of bounds
- maxy:
- type: number
- description: Maximum Y value of bounds
- crs:
- type: string
- description: CRS code, usually in the form EPSG:####
- keywords:
- type: object
- description: A collection of keywords associated with the resource.
- properties:
- keyword:
- type: array
- description: List of keyword values with internationalization and vocabulary
- items:
- type: string
- description: A single keyword value
- LayergroupPublished:
- type: object
- title: layer
- properties:
- name:
- type: string
- description: Name of the comprising layer, or empty to indicate a style group defined by the corresponding style.
- link:
- type: string
- description: URL to the comprising layer
- LayergroupStyle:
- title: style
- type: object
- description: Style to use to render layer
- properties:
- name:
- type: string
- description: Name of the style for the corresponding layer in the list, or empty to use the default style of the corresponding layer.
- link:
- type: string
- description: URL of the style for the corresponding layer in the list
- LayergroupMetadataLink:
- title: metadataLink
- type: object
- properties:
- type:
- type: string
- description: MIME type
- metadataType:
- type: string
- description: Metadata type. Can be ISO9115:2003, FGDC, TC211, 19139, or other.
- content:
- type: string
- description: URL of metadata link
|