123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604 |
- ---
- swagger: '2.0'
- info:
- version: 1.0.0
- title: GeoServer Layers
- description: A layer is a published resource (feature type or coverage).
- contact:
- name: GeoServer
- email: 'geoserver-users@osgeo.org'
- url: 'https://geoserver.org/comm/'
- host: localhost:8080
- basePath: /geoserver/rest
- paths:
- /layers:
- get:
- operationId: layersGet
- tags:
- - "Layers"
- summary: Get a list of layers
- description: Displays a list of all layers on the server. You must use the "Accept:" header to specify format or append an extension to the endpoint (example "/layers.xml" for XML)
- produces:
- - text/html
- - application/xml
- - application/json
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/Layers"
- examples:
- application/xml: |
- <layers>
- <layer>
- <name>tiger:giant_polygon</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
- href="http://localhost:8080/geoserver/rest/layers/tiger%3Agiant_polygon.xml"
- type="application/xml"/>
- </layer>
- <layer>
- <name>sf:bugsites</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
- href="http://localhost:8080/geoserver/rest/layers/sf%3Abugsites.xml"
- type="application/xml"/>
- </layer>
- </layers>
-
- application/json: |
- {
- "layers": {
- "layer": [
- {
- "name": "tiger:giant_polygon",
- "href": "http:\/\/localhost:8080\/geoserver\/rest\/layers\/tiger%3Agiant_polygon.json"
- },
- {
- "name": "sf:bugsites",
- "href": "http:\/\/localhost:8080\/geoserver\/rest\/layers\/sf%3Abugsites.json"
- },
- ]
- }
- }
- post:
- operationId: layersPost
- tags:
- - "Layers"
- description: Invalid. To create a new layer, instead POST to one of `/workspaces/{workspaceName}/coveragestores/{coveragestoreName}/coverages`, `/workspaces/{workspaceName}/datastores/{datastoreName}/featuretypes`, `/workspaces/{workspaceName}/wmsstores/{wmsstoreName}/wmslayers`, or `/workspaces/{workspaceName}/wmtsstores/{wmststoreName}/wmtslayers`
- responses:
- 405:
- description: Method not allowed.
- put:
- operationId: layersPut
- tags:
- - "Layers"
- description: Invalid. To edit a layer, use PUT on an individual layer instead.
- responses:
- 405:
- description: Method not allowed.
- delete:
- operationId: layersDelete
- tags:
- - "Layers"
- description: Invalid.
- responses:
- 405:
- description: Method not allowed.
- /layers/{layerName}:
- get:
- operationId: layersNameGet
- tags:
- - "Layers"
- summary: Retrieve a layer
- description: Retrieves a single layer definition. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layers/{layer}.xml" for XML).
- produces:
- - application/xml
- - application/json
- - text/html
- parameters:
- - name: layerName
- in: path
- required: true
- description: The name of the layer to retrieve.
- type: string
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/Layer"
- examples:
- application/xml: |
- <layer>
- <name>poi</name>
- <path>/</path>
- <type>VECTOR</type>
- <defaultStyle>
- <name>poi</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/poi.xml" type="application/xml"/>
- </defaultStyle>
- <styles class="linked-hash-set">
- <style>
- <name>burg</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/burg.xml" type="application/xml"/>
- </style>
- <style>
- <name>point</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/point.xml" type="application/xml"/>
- </style>
- </styles>
- <resource class="featureType">
- <name>poi</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/tiger/datastores/nyc/featuretypes/poi.xml" type="application/xml"/>
- </resource>
- <attribution>
- <logoWidth>0</logoWidth>
- <logoHeight>0</logoHeight>
- </attribution>
- </layer>
-
- application/json: |
- {
-
- "layer": {
- "name": "poi",
- "path": "/",
- "type": "VECTOR",
- "defaultStyle": {
- "name": "poi",
- "href": "http://localhost:8080/geoserver/rest/styles/poi.json"
- },
- "styles": {
- "@class": "linked-hash-set",
- "style": [
- {
- "name": "burg",
- "href": "http://localhost:8080/geoserver/rest/styles/burg.json"
- },
- {
- "name": "point",
- "href": "http://localhost:8080/geoserver/rest/styles/point.json"
- }
- ]
- },
- "resource": {
- "@class": "featureType",
- "name": "poi",
- "href": "http://localhost:8080/geoserver/rest/workspaces/tiger/datastores/nyc/featuretypes/poi.json"
- },
- "attribution": {
- "logoWidth": 0,
- "logoHeight": 0
- }
- }
-
- }
- post:
- operationId: layersNamePost
- tags:
- - "Layers"
- description: Invalid. To create a new layer, instead POST to one of `/workspaces/{workspaceName}/coveragestores/{coveragestoreName}/coverages`, `/workspaces/{workspaceName}/datastores/{datastoreName}/featuretypes`, `/workspaces/{workspaceName}/wmsstores/{wmsstoreName}/wmslayers`, or `/workspaces/{workspaceName}/wmtsstores/{wmststoreName}/wmtslayers`
- responses:
- 405:
- description: Method not allowed.
- put:
- operationId: layersNamePut
- tags:
- - "Layers"
- summary: Modify a layer.
- description: Modifies an existing layer on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layers/{layer}.xml" for XML).
- parameters:
- - name: layerName
- in: path
- required: true
- description: The name of the layer to modify.
- type: string
- - name: layerBody
- in: body
- description: The updated layer definition.
- required: true
- schema:
- $ref: "#/definitions/Layer"
- consumes:
- - application/xml
- - application/json
- responses:
- 200:
- description: The layer was successfully updated.
- delete:
- operationId: layersNameDelete
- tags:
- - "Layers"
- summary: Delete layer
- description: Deletes a layer from the server.
- parameters:
- - name: layerName
- in: path
- required: true
- description: The name of the layer to delete.
- type: string
- - name: recurse
- in: query
- description: Recursively removes the layer from all layer groups which reference it. If this results in an empty layer group, also delete the layer group. Allowed values for this parameter are true or false. The default value is false. A request with 'recurse=false' will fail if any layer groups reference the layer.
- required: false
- type: boolean
- default: false
- responses:
- 200:
- description: OK
- /workspaces/{workspaceName}/layers:
- get:
- operationId: layersWorkspaceGet
- tags:
- - "Layers"
- summary: Get a list of layers in a workspace.
- description: Displays a list of all layers in the provided workspace. You must use the "Accept:" header to specify format or append an extension to the endpoint (example "/layers.xml" for XML)
- parameters:
- - name: workspaceName
- in: path
- required: true
- description: The name of the workspace to list layers in
- type: string
- produces:
- - text/html
- - application/xml
- - application/json
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/Layers"
- examples:
- application/xml: |
- <layers>
- <layer>
- <name>bugsites</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
- href="http://localhost:8080/geoserver/rest/workspaces/sf/layers/bugsites.xml"
- type="application/xml"/>
- </layer>
- </layers>
-
- application/json: |
- {
- "layers": {
- "layer": [
- {
- "name": "bugsites",
- "href": "http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/sf\/layers\/bugsites.json"
- },
- ]
- }
- }
- post:
- operationId: layersWorkspacePost
- tags:
- - "Layers"
- description: Invalid. To create a new layer, instead POST to one of `/workspaces/{workspaceName}/coveragestores/{coveragestoreName}/coverages`, `/workspaces/{workspaceName}/datastores/{datastoreName}/featuretypes`, `/workspaces/{workspaceName}/wmsstores/{wmsstoreName}/wmslayers`, or `/workspaces/{workspaceName}/wmtsstores/{wmststoreName}/wmtslayers`
- responses:
- 405:
- description: Method not allowed.
- put:
- operationId: layersWorkspacePut
- tags:
- - "Layers"
- description: Invalid. To edit a layer, use PUT on an individual layer instead.
- responses:
- 405:
- description: Method not allowed.
- delete:
- operationId: layersWorkspaceDelete
- tags:
- - "Layers"
- description: Invalid.
- responses:
- 405:
- description: Method not allowed.
- /workspaces/{workspaceName}/layers/{layerName}:
- get:
- operationId: layersNameWorkspaceGet
- tags:
- - "Layers"
- summary: Retrieve a layer
- description: Retrieves a single layer definition. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layers/{layer}.xml" for XML).
- produces:
- - application/xml
- - application/json
- - text/html
- parameters:
- - name: workspaceName
- in: path
- required: true
- description: The name of the workspace the layer is in.
- type: string
- - name: layerName
- in: path
- required: true
- description: The name of the layer to retrieve.
- type: string
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/Layer"
- examples:
- application/xml: |
- <layer>
- <name>poi</name>
- <path>/</path>
- <type>VECTOR</type>
- <defaultStyle>
- <name>poi</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/poi.xml" type="application/xml"/>
- </defaultStyle>
- <styles class="linked-hash-set">
- <style>
- <name>burg</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/burg.xml" type="application/xml"/>
- </style>
- <style>
- <name>point</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/point.xml" type="application/xml"/>
- </style>
- </styles>
- <resource class="featureType">
- <name>poi</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/tiger/datastores/nyc/featuretypes/poi.xml" type="application/xml"/>
- </resource>
- <attribution>
- <logoWidth>0</logoWidth>
- <logoHeight>0</logoHeight>
- </attribution>
- </layer>
-
- application/json: |
- {
-
- "layer": {
- "name": "poi",
- "path": "/",
- "type": "VECTOR",
- "defaultStyle": {
- "name": "poi",
- "href": "http://localhost:8080/geoserver/rest/styles/poi.json"
- },
- "styles": {
- "@class": "linked-hash-set",
- "style": [
- {
- "name": "burg",
- "href": "http://localhost:8080/geoserver/rest/styles/burg.json"
- },
- {
- "name": "point",
- "href": "http://localhost:8080/geoserver/rest/styles/point.json"
- }
- ]
- },
- "resource": {
- "@class": "featureType",
- "name": "poi",
- "href": "http://localhost:8080/geoserver/rest/workspaces/tiger/datastores/nyc/featuretypes/poi.json"
- },
- "attribution": {
- "logoWidth": 0,
- "logoHeight": 0
- }
- }
-
- }
- post:
- operationId: layersNameWorkspacePost
- tags:
- - "Layers"
- description: Invalid. To create a new layer, instead POST to one of `/workspaces/{workspaceName}/coveragestores/{coveragestoreName}/coverages`, `/workspaces/{workspaceName}/datastores/{datastoreName}/featuretypes`, `/workspaces/{workspaceName}/wmsstores/{wmsstoreName}/wmslayers`, or `/workspaces/{workspaceName}/wmtsstores/{wmststoreName}/wmtslayers`
- responses:
- 405:
- description: Method not allowed.
- put:
- operationId: layersNameWorkspacePut
- tags:
- - "Layers"
- summary: Modify a layer.
- description: Modifies an existing layer on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/layers/{layer}.xml" for XML).
- parameters:
- - name: workspaceName
- in: path
- required: true
- description: The name of the workspace the layer is in.
- - name: layerName
- in: path
- required: true
- description: The name of the layer to modify.
- type: string
- - name: layerBody
- in: body
- description: The updated layer definition.
- required: true
- schema:
- $ref: "#/definitions/Layer"
- consumes:
- - application/xml
- - application/json
- responses:
- 200:
- description: The layer was successfully updated.
- delete:
- operationId: layersNameWorkspaceDelete
- tags:
- - "Layers"
- summary: Delete layer
- description: Deletes a layer from the server.
- parameters:
- - name: workspaceName
- in: path
- required: true
- description: The name of the workspace the layer is in.
- - name: layerName
- in: path
- required: true
- description: The name of the layer to delete.
- type: string
- - name: recurse
- in: query
- description: Recursively removes the layer from all layer groups which reference it. If this results in an empty layer group, also delete the layer group. Allowed values for this parameter are true or false. The default value is false. A request with 'recurse=false' will fail if any layer groups reference the layer.
- required: false
- type: boolean
- default: false
- responses:
- 200:
- description: OK
- definitions:
- Layers:
- title: layers
- type: object
- properties:
- layers:
- $ref: "#/definitions/LayerReference"
-
- LayerReference:
- title: layers
- type: object
- properties:
- name:
- type: string
- description: Name of layer
- link:
- type: string
- description: URL to layer definition
-
- Layer:
- title: layer
- xml:
- name: layer
- type: object
- properties:
- name:
- type: string
- description: Name of the layer
- path:
- type: string
- description: Location of the layer in the WMS capabilities layer tree
- type:
- type: string
- enum:
- - VECTOR
- - RASTER
- - REMOTE
- - WMS
- - GROUP
- description: Type of published layer. Can be VECTOR, RASTER, REMOTE, WMS or GROUP. Must be consistent with resource definition.
- defaultStyle:
- $ref: "#/definitions/StyleReference"
- styles:
- type: object
- description: Avaialble styles for layer publication
- properties:
- '@class':
- type: string
- enum:
- - linked-hash-set
- description: required value linked-hash-set.
- style:
- type: array
- items:
- $ref: "#/definitions/StyleReference"
- resource:
- type: object
- description: Resource supplying information for layer publication
- properties:
- '@class':
- type: string
- enum:
- - featureType
- default: featureType
- description: required value featureType
- name:
- type: string
- description: Name of resource
- link:
- type: string
- readOnly: true
- description: URL to the resource definition
- opaque:
- type: boolean
- description: Controls layer transparency (whether the layer is opaque or transparent).
- metadata:
- type: array
- items:
- $ref: "#/definitions/MetadataEntry"
- attribution:
- type: object
- description: WMS attribution information to be drawn on each map
- properties:
- title:
- type: string
- description: Human-readable text describing the data provider
- href:
- type: string
- description: URL to data provider
- logoURL:
- type: string
- description: Data provider logo
- logoWidth:
- type: integer
- description: Data provider logo width
- logoHeight:
- type: integer
- description: Data provider logo height
- logoType:
- type: string
- description: Format of data provider logo, example "image/png"
- authorityURLs:
- type: array
- items:
- type: object
- title: AuthorityURL
- properties:
- name:
- type: string
- description: Authory name, describing the industry, national or international origanization responsible for data product standard.
- href:
- type: string
- description: URL to authority organization
- identifiers:
- type: array
- items:
- type: object
- title: Identifier
- properties:
- authority:
- type: string
- description: Authority cited, for details see authorityURLs
- identifier:
- type: string
- description: Work citied, often a data standard provided by
- StyleReference:
- type: object
- title: style
- description: Reference to style definition
- properties:
- name:
- type: string
- description: Name of style
- link:
- type: string
- readOnly: true
- description: URL to the style definition
- MetadataEntry:
- type: object
- title: entry
- properties:
- '@key':
- title: key
- type: string
- enum:
- - buffer
- description: Key used for metadata entry, additional keys are added over time
- '$':
- title: text
- type: string
- description: Text value for provided key Valid text depends on key used. Example {'@key'='buffer','$'='5'}") or <entry key="buffer">5</entry>
|