gwclayers.yaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoWebCache Layers
  6. description: A layer is a published resource (feature type or coverage).
  7. contact:
  8. name: GeoServer
  9. email: 'geoserver-users@osgeo.org'
  10. url: 'https://geoserver.org/comm/'
  11. host: localhost:8080
  12. schemes:
  13. - http
  14. basePath: /geoserver/gwc/rest
  15. paths:
  16. /layers:
  17. get:
  18. operationId: layersGet
  19. tags:
  20. - "GwcLayers"
  21. summary: Get a list of cached layers
  22. description: Displays a list of all cached layers on the server.
  23. produces:
  24. - application/xml
  25. - application/json
  26. responses:
  27. 200:
  28. description: OK
  29. schema:
  30. $ref: "#/definitions/Layers"
  31. examples:
  32. application/xml: |
  33. <layers>
  34. <layer>
  35. <name>opengeo:countries</name>
  36. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/gwc/layers/opengeo%3Acountries.xml" type="text/xml"/>
  37. </layer>
  38. <layer>
  39. <name>usa:states</name>
  40. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/gwc/layers/usa%3Astates.xml" type="text/xml"/>
  41. </layer>
  42. </layers>
  43. /layers/{layerName}:
  44. get:
  45. operationId: layersNameGet
  46. tags:
  47. - "GwcLayers"
  48. summary: Retrieve a cached layer
  49. description: Retrieves a single cached layer definition.
  50. produces:
  51. - application/xml
  52. - application/json
  53. parameters:
  54. - name: layerName
  55. in: path
  56. required: true
  57. description: The name of the layer to retrieve.
  58. type: string
  59. responses:
  60. 200:
  61. description: OK
  62. schema:
  63. $ref: "#/definitions/Layer"
  64. examples:
  65. application/xml: |
  66. <GeoServerLayer>
  67. <id>LayerInfoImpl--3a33e7d0:1400d3d823c:-7fdf</id>
  68. <enabled>true</enabled>
  69. <inMemoryCached>true</inMemoryCached>
  70. <name>opengeo:countries</name>
  71. <mimeFormats>
  72. <string>image/png</string>
  73. <string>image/jpeg</string>
  74. </mimeFormats>
  75. <gridSubsets>
  76. <gridSubset>
  77. <gridSetName>EPSG:900913</gridSetName>
  78. </gridSubset>
  79. <gridSubset>
  80. <gridSetName>EPSG:4326</gridSetName>
  81. </gridSubset>
  82. </gridSubsets>
  83. <metaWidthHeight>
  84. <int>4</int>
  85. <int>4</int>
  86. </metaWidthHeight>
  87. <expireCache>0</expireCache>
  88. <expireClients>0</expireClients>
  89. <parameterFilters>
  90. <styleParameterFilter>
  91. <key>STYLES</key>
  92. <defaultValue/>
  93. </styleParameterFilter>
  94. </parameterFilters>
  95. <gutter>0</gutter>
  96. </GeoServerLayer>
  97. 404:
  98. description: Unknown layer
  99. put:
  100. operationId: layersNamePut
  101. tags:
  102. - "GwcLayers"
  103. summary: Create or update a cached layer.
  104. description: Creates a new cached layer on the server, or modifies an existing cached layer.
  105. parameters:
  106. - name: layerName
  107. in: path
  108. required: true
  109. description: The name of the layer to add.
  110. type: string
  111. - name: layerBody
  112. in: body
  113. description: The new layer definition.
  114. required: true
  115. schema:
  116. $ref: "#/definitions/Layer"
  117. consumes:
  118. - application/xml
  119. - application/json
  120. responses:
  121. 200:
  122. description: The layer was successfully updated.
  123. 201:
  124. description: The layer was successfully created.
  125. post:
  126. operationId: layersNamePost
  127. tags:
  128. - "GwcLayers"
  129. summary: Modify a cached layer (Deprecated).
  130. description: Modifies an existing cached layer on the server. Deprecated - use PUT instead.
  131. parameters:
  132. - name: layerName
  133. in: path
  134. required: true
  135. description: The name of the layer to modify.
  136. type: string
  137. - name: layerBody
  138. in: body
  139. description: The updated layer definition.
  140. required: true
  141. schema:
  142. $ref: "#/definitions/Layer"
  143. consumes:
  144. - application/xml
  145. - application/json
  146. responses:
  147. 200:
  148. description: The layer was successfully updated.
  149. delete:
  150. operationId: layersNameDelete
  151. tags:
  152. - "GwcLayers"
  153. summary: Delete cached layer
  154. description: Deletes a cached layer from the server.
  155. parameters:
  156. - name: layerName
  157. in: path
  158. required: true
  159. description: The name of the layer to delete.
  160. type: string
  161. responses:
  162. 200:
  163. description: OK
  164. definitions:
  165. Layers:
  166. title: layers
  167. type: array
  168. items:
  169. $ref: "#/definitions/LayerReference"
  170. LayerReference:
  171. title: layer
  172. type: object
  173. properties:
  174. name:
  175. type: string
  176. description: Name of layer
  177. link:
  178. type: string
  179. description: URL to layer definition
  180. Layer:
  181. title: layer
  182. xml:
  183. name: layer
  184. type: object
  185. properties:
  186. id:
  187. type: string
  188. description: Unique ID of the layer.
  189. enabled:
  190. type: boolean
  191. description: Indicates whether tile caching is enabled for this layer.
  192. inMemoryCached:
  193. type: boolean
  194. description: Determines if the layer is cached.
  195. name:
  196. type: string
  197. description: The name of the layer.
  198. mimeFormats:
  199. type: array
  200. items:
  201. type: string
  202. description: List of formats to be supported (ie. img/jpeg...).
  203. gridSubsets:
  204. type: object
  205. description: The grid definitions contain information about the SRS, the maximum extent for this SRS and the bounds of your data.
  206. properties:
  207. 'gridSubset':
  208. type: object
  209. description: Contains the values for gridSetName.
  210. properties:
  211. 'gridSetName':
  212. type: string
  213. description: This name must match the name of the parent gridSet exactly.
  214. 'extent':
  215. type: object
  216. description: These bounds define the subset of the extent that this grid subset covers.
  217. properties:
  218. 'bounds':
  219. type: number
  220. description: Coordinates used to set bounds uses double(ie. {-x,-y,x,y})
  221. 'zoomStart':
  222. type: integer
  223. description: If the layer does not make sense at high zoom levels you can define a starting point here.
  224. 'zoomStop':
  225. type: integer
  226. description: If the layer does not contain features that make sense to show when zoomed in then you can set the stop level here.
  227. metaWidthHeight:
  228. type: integer
  229. description: The metatiling factors used for this layer.
  230. expireCache:
  231. type: integer
  232. description: How old the tile may be before it is refetched from the backend.
  233. expireClients:
  234. type: integer
  235. description: The HTTP expiration header sent to client.
  236. parameterFilters:
  237. type: object
  238. description: A list of parameter filters, meaning parameters the client may specify that GWC will forward to the backend.
  239. gutter:
  240. type: integer
  241. description: The gutter is a buffer around the image that is sliced away when saving the tiles to disk.