layergroups.yaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. ---
  2. swagger: '2.0'
  3. info:
  4. version: 1.0.0
  5. title: GeoServer Layer Groups
  6. 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.
  7. contact:
  8. name: GeoServer
  9. email: 'geoserver-users@osgeo.org'
  10. url: 'https://geoserver.org/comm/'
  11. host: localhost:8080
  12. basePath: /geoserver/rest
  13. paths:
  14. /layergroups:
  15. get:
  16. operationId: getLayergroups
  17. tags:
  18. - "LayerGroups"
  19. summary: Get a list of layer groups
  20. 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)
  21. produces:
  22. - application/xml
  23. - application/json
  24. - text/html
  25. responses:
  26. 200:
  27. description: OK
  28. schema:
  29. $ref: "#/definitions/LayergroupResponse"
  30. examples:
  31. application/xml: |
  32. <layerGroups>
  33. <layerGroup>
  34. <name>spearfish</name>
  35. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/layergroups/spearfish.xml" type="application/xml"/>
  36. </layerGroup>
  37. </layerGroups>
  38. application/json: |
  39. {"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"}]}}
  40. post:
  41. operationId: postLayergroups
  42. tags:
  43. - "LayerGroups"
  44. summary: Add a new layer group
  45. description: Adds a new layer group entry to the server.
  46. parameters:
  47. - name: layergroupBody
  48. description: The layer group body information to upload.
  49. in: body
  50. required: true
  51. schema:
  52. $ref: "#/definitions/Layergroup"
  53. consumes:
  54. - application/xml
  55. - application/json
  56. responses:
  57. 201:
  58. description: Created
  59. schema:
  60. type: string
  61. headers:
  62. Location:
  63. description: URL where the newly created layer group can be found
  64. type: string
  65. put:
  66. operationId: putLayergroups
  67. tags:
  68. - "LayerGroups"
  69. description: Invalid. Use POST for adding a new layer group, or PUT on /layergroups/{layergroup} to edit an existing layer group.
  70. responses:
  71. 405:
  72. description: Method Not Allowed
  73. delete:
  74. operationId: deleteLayergroups
  75. tags:
  76. - "LayerGroups"
  77. description: Invalid. Use /layergroups/{layergroup} instead.
  78. responses:
  79. 405:
  80. description: Method Not Allowed
  81. /layergroups/{layergroupName}:
  82. get:
  83. operationId: getLayergroup
  84. tags:
  85. - "LayerGroups"
  86. summary: Retrieve a layer group
  87. 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).
  88. produces:
  89. - application/xml
  90. - application/json
  91. - text/html
  92. parameters:
  93. - name: layergroupName
  94. in: path
  95. required: true
  96. description: The name of the layer group to retrieve.
  97. type: string
  98. responses:
  99. 200:
  100. description: OK
  101. schema:
  102. $ref: "#/definitions/Layergroup"
  103. examples:
  104. application/xml: |
  105. <layerGroup>
  106. <name>spearfish</name>
  107. <mode>SINGLE</mode>
  108. <title>Spearfish</title>
  109. <abstractTxt>Spearfish City in Lawrence County, South Dakota</abstractTxt>
  110. <publishables>
  111. <published type="layer">
  112. <name>sfdem</name>
  113. <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"/>
  114. </published>
  115. <published type="layer">
  116. <name>streams</name>
  117. <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"/>
  118. </published>
  119. </publishables>
  120. <styles>
  121. <style>
  122. <name>dem</name>
  123. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/dem.xml" type="application/xml"/>
  124. <style/>
  125. </styles>
  126. <bounds>
  127. <minx>589425.9342365642</minx>
  128. <maxx>609518.6719560538</maxx>
  129. <miny>4913959.224611808</miny>
  130. <maxy>4928082.949945881</maxy>
  131. <crs class="projected">EPSG:26713</crs>
  132. </bounds>
  133. <metadata>
  134. <entry key="rawStyleList"></entry>
  135. </metadata>
  136. <keywords>
  137. <keyword>keyword1\@language=en\;\@vocabulary=vocabulary1\;</keyword>
  138. <keyword>keyword2\@language=pt\;\@vocabulary=vocabulary2\;</keyword>
  139. </keywords>
  140. </layerGroup>
  141. application/json: |
  142. {"layerGroup": {
  143. "name":"spearfish",
  144. "mode":"SINGLE",
  145. "title":"Spearfish",
  146. "abstractTxt":"Spearfish City in Lawrence County, South Dakota",
  147. "publishables":{"published":[
  148. {"@type":"layer",
  149. "name":"sfdem",
  150. "href":"http://localhost:8080/geoserver/rest/workspaces/sf/layers/sfdem.json"},
  151. {"@type":"layer",
  152. "name":"streams",
  153. "href":"http://localhost:8080/geoserver/rest/workspaces/sf/layers/streams.json"}]},
  154. "styles": {"style":[
  155. {"name":"dem",
  156. "href":"http://localhost:8080/geoserver/rest/styles/dem.json"},
  157. "null"]},
  158. "bounds": { "minx":589425.9342365642,
  159. "maxx":609518.6719560538,
  160. "miny":4913959.224611808,
  161. "maxy":4928082.949945881,
  162. "crs":{"@class":"projected","$":"EPSG:26713"}},
  163. "metadata":{"entry":{"@key":"rawStyleList","$":""}}
  164. }
  165. }
  166. post:
  167. operationId: postLayergroup
  168. tags:
  169. - "LayerGroups"
  170. description: Invalid. Use PUT to edit a layer group definition, or POST with /layergroups to add a new definition.
  171. responses:
  172. 405:
  173. description: Method Not Allowed
  174. put:
  175. operationId: putLayergroup
  176. tags:
  177. - "LayerGroups"
  178. summary: Modify a layer group.
  179. 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).
  180. parameters:
  181. - name: layergroupName
  182. in: path
  183. required: true
  184. description: The name of the layer group to modify.
  185. type: string
  186. - name: layergroupBody
  187. in: body
  188. description: The updated layer group definition.
  189. required: true
  190. schema:
  191. $ref: "#/definitions/Layergroup"
  192. consumes:
  193. - application/xml
  194. - application/json
  195. responses:
  196. 200:
  197. description: The layer group was successfully updated.
  198. delete:
  199. operationId: deleteLayergroup
  200. tags:
  201. - "LayerGroups"
  202. summary: Delete layer group
  203. description: Deletes a layer group from the server.
  204. parameters:
  205. - name: layergroupName
  206. in: path
  207. required: true
  208. description: The name of the layer group to delete.
  209. type: string
  210. responses:
  211. 200:
  212. description: OK
  213. /workspaces/{workspace}/layergroups:
  214. get:
  215. operationId: getWorkspaceLayergroups
  216. tags:
  217. - "LayerGroups"
  218. summary: Get a list of layer groups in a workspace
  219. 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).
  220. produces:
  221. - application/xml
  222. - application/json
  223. - text/html
  224. parameters:
  225. - $ref: "#/parameters/Workspace"
  226. responses:
  227. 200:
  228. description: OK
  229. schema:
  230. $ref: "#/definitions/LayergroupResponse"
  231. examples:
  232. application/xml: '
  233. <layerGroups>
  234. <layerGroup>
  235. <name>spearfish</name>
  236. <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"/>
  237. </layerGroup>
  238. </layerGroups>
  239. '
  240. application/json: '
  241. {"layerGroups":{"layerGroup":[{"name":"spearfish","href":"http:\/\/localhost:8080\/geoserver\/rest\/workspaces\/sf\/layergroups\/spearfish.json"}]}}
  242. '
  243. post:
  244. operationId: postWorkspaceLayergroups
  245. tags:
  246. - "LayerGroups"
  247. summary: Add a new layer group
  248. description: Adds a new layer group entry to the server in the specified workspace.
  249. parameters:
  250. - name: layergroupBody
  251. description: The layer group body information to upload.
  252. in: body
  253. required: true
  254. schema:
  255. $ref: "#/definitions/Layergroup"
  256. consumes:
  257. - application/xml
  258. - application/json
  259. responses:
  260. 201:
  261. description: Created
  262. schema:
  263. type: string
  264. headers:
  265. Location:
  266. description: URL where the newly created layer group can be found
  267. type: string
  268. put:
  269. operationId: putWorkspaceLayergroups
  270. tags:
  271. - "LayerGroups"
  272. 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.
  273. responses:
  274. 405:
  275. description: Method Not Allowed
  276. delete:
  277. operationId: deleteWorkspaceLayergroups
  278. tags:
  279. - "LayerGroups"
  280. description: Invalid. Use /workspaces/{workspace}/layergroups/{layergroup} instead.
  281. responses:
  282. 405:
  283. description: Method Not Allowed
  284. /workspaces/{workspace}/layergroups/{layergroup}:
  285. get:
  286. operationId: getWorkspaceLayergroup
  287. tags:
  288. - "LayerGroups"
  289. summary: Retrieve a layer group
  290. 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).
  291. produces:
  292. - application/xml
  293. - application/json
  294. - text/html
  295. parameters:
  296. - $ref: "#/parameters/Workspace"
  297. - name: layergroup
  298. in: path
  299. required: true
  300. description: The name of the layer group to retrieve.
  301. type: string
  302. responses:
  303. 200:
  304. description: OK
  305. schema:
  306. $ref: "#/definitions/Layergroup"
  307. examples:
  308. application/json: |
  309. {"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","$":""}}}}
  310. application/xml: |
  311. <layerGroup>
  312. <name>spearfish</name>
  313. <mode>SINGLE</mode>
  314. <title>Spearfish</title>
  315. <abstractTxt>Spearfish City in Lawrence County, South Dakota</abstractTxt>
  316. <workspace>
  317. <name>sf</name>
  318. </workspace>
  319. <publishables>
  320. <published type="layer">
  321. <name>sfdem</name>
  322. <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"/>
  323. </published>
  324. <published type="layer">
  325. <name>streams</name>
  326. <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"/>
  327. </published>
  328. </publishables>
  329. <styles>
  330. <style>
  331. <name>dem</name>
  332. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/dem.xml" type="application/xml"/>
  333. <style/>
  334. </styles>
  335. <bounds>
  336. <minx>589425.9342365642</minx>
  337. <maxx>609518.6719560538</maxx>
  338. <miny>4913959.224611808</miny>
  339. <maxy>4928082.949945881</maxy>
  340. <crs class="projected">EPSG:26713</crs>
  341. </bounds>
  342. <metadata>
  343. <entry key="rawStyleList"></entry>
  344. </metadata>
  345. </layerGroup>
  346. post:
  347. operationId: postWorkspaceLayergroup
  348. tags:
  349. - "LayerGroups"
  350. description: Invalid. Use PUT to edit a layer group definition, or POST with /workspaces/{workspace}/layergroups to add a new definition.
  351. responses:
  352. 405:
  353. description: Method Not Allowed
  354. put:
  355. operationId: putWorkspaceLayergroup
  356. tags:
  357. - "LayerGroups"
  358. summary: Modify a layer group.
  359. 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).
  360. parameters:
  361. - $ref: "#/parameters/Workspace"
  362. - name: layergroup
  363. in: path
  364. required: true
  365. description: The name of the layer group to modify.
  366. type: string
  367. - name: layergroupBody
  368. in: body
  369. description: The updated layer group definition.
  370. required: true
  371. schema:
  372. $ref: "#/definitions/Layergroup"
  373. consumes:
  374. - application/xml
  375. - application/json
  376. responses:
  377. 200:
  378. description: The layer group was successfully updated.
  379. delete:
  380. operationId: deleteWorkspaceLayergroup
  381. tags:
  382. - "LayerGroups"
  383. summary: Delete layer group
  384. description: Deletes a layer group from the server in the given workspace.
  385. parameters:
  386. - name: layergroup
  387. in: path
  388. required: true
  389. description: The name of the layer group to delete.
  390. type: string
  391. - $ref: "#/parameters/Workspace"
  392. responses:
  393. 200:
  394. description: OK
  395. parameters:
  396. Workspace:
  397. name: workspace
  398. type: string
  399. in: path
  400. description: The name of the workspace
  401. required: true
  402. definitions:
  403. LayergroupResponse:
  404. title: layerGroups
  405. type: object
  406. properties:
  407. layerGroups:
  408. $ref: "#/definitions/Layergroups"
  409. Layergroups:
  410. title: layerGroup
  411. type: object
  412. properties:
  413. name:
  414. type: string
  415. description: Name of layer group
  416. link:
  417. type: string
  418. description: URL to layer group definition
  419. Layergroup:
  420. title: layerGroup
  421. xml:
  422. name: layerGroup
  423. type: object
  424. properties:
  425. name:
  426. type: string
  427. description: Name of the layer group
  428. mode:
  429. type: string
  430. enum:
  431. - SINGLE
  432. - NAMED
  433. - CONTAINER
  434. - EO
  435. description: Name of the layer group mode. Can be SINGLE, NAMED, CONTAINER, or EO.
  436. title:
  437. type: string
  438. description: Title of the layer group
  439. abstractTxt:
  440. type: string
  441. description: Abstract of the layer group
  442. workspace:
  443. type: object
  444. properties:
  445. name:
  446. type: string
  447. description: Name of workspace that contains the layer group. Will only exist when request includes workspace name (/workspaces/{workspace}/...).
  448. publishables:
  449. type: object
  450. description: Layers published by group (in draw order)
  451. properties:
  452. published:
  453. type: array
  454. description: Published layer
  455. items:
  456. $ref: "#/definitions/LayergroupPublished"
  457. styles:
  458. type: object
  459. description: Styles used to render layers in group
  460. properties:
  461. style:
  462. description: Style to render layer, or empty to use default style.
  463. type: array
  464. items:
  465. $ref: "#/definitions/LayergroupStyle"
  466. metadataLinks:
  467. type: array
  468. items:
  469. $ref: "#/definitions/LayergroupMetadataLink"
  470. bounds:
  471. type: object
  472. properties:
  473. minx:
  474. type: number
  475. description: Minimum X value of bounds
  476. maxx:
  477. type: number
  478. description: Maximum X value of bounds
  479. miny:
  480. type: number
  481. description: Minimum Y value of bounds
  482. maxy:
  483. type: number
  484. description: Maximum Y value of bounds
  485. crs:
  486. type: string
  487. description: CRS code, usually in the form EPSG:####
  488. keywords:
  489. type: object
  490. description: A collection of keywords associated with the resource.
  491. properties:
  492. keyword:
  493. type: array
  494. description: List of keyword values with internationalization and vocabulary
  495. items:
  496. type: string
  497. description: A single keyword value
  498. LayergroupPublished:
  499. type: object
  500. title: layer
  501. properties:
  502. name:
  503. type: string
  504. description: Name of the comprising layer, or empty to indicate a style group defined by the corresponding style.
  505. link:
  506. type: string
  507. description: URL to the comprising layer
  508. LayergroupStyle:
  509. title: style
  510. type: object
  511. description: Style to use to render layer
  512. properties:
  513. name:
  514. type: string
  515. description: Name of the style for the corresponding layer in the list, or empty to use the default style of the corresponding layer.
  516. link:
  517. type: string
  518. description: URL of the style for the corresponding layer in the list
  519. LayergroupMetadataLink:
  520. title: metadataLink
  521. type: object
  522. properties:
  523. type:
  524. type: string
  525. description: MIME type
  526. metadataType:
  527. type: string
  528. description: Metadata type. Can be ISO9115:2003, FGDC, TC211, 19139, or other.
  529. content:
  530. type: string
  531. description: URL of metadata link