layergroups.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. .. _rest_api_layergroups:
  2. Layer groups
  3. ============
  4. A ``layer group`` is a grouping of layers and styles that can be accessed as a single layer in a WMS GetMap request. A layer group is sometimes referred to as a "base map".
  5. ``/layergroups[.<format>]``
  6. ---------------------------
  7. Controls all layer groups.
  8. .. list-table::
  9. :header-rows: 1
  10. * - Method
  11. - Action
  12. - Status code
  13. - Formats
  14. - Default Format
  15. * - GET
  16. - Return all layer groups
  17. - 200
  18. - HTML, XML, JSON
  19. - HTML
  20. * - POST
  21. - Add a new layer group
  22. - 201, with ``Location`` header
  23. - XML,JSON
  24. -
  25. * - PUT
  26. -
  27. - 405
  28. -
  29. -
  30. * - DELETE
  31. -
  32. - 405
  33. -
  34. -
  35. ``/layergroups/<lg>[.<format>]``
  36. --------------------------------
  37. Controls a particular layer group.
  38. .. list-table::
  39. :header-rows: 1
  40. * - Method
  41. - Action
  42. - Status code
  43. - Formats
  44. - Default Format
  45. - Parameters
  46. * - GET
  47. - Return layer group ``lg``
  48. - 200
  49. - HTML, XML, JSON
  50. - HTML
  51. - :ref:`quietOnNotFound <rest_api_layergroups_quietOnNotFound>`
  52. * - POST
  53. -
  54. - 405
  55. -
  56. -
  57. -
  58. * - PUT
  59. - Modify layer group ``lg``
  60. - 200
  61. - XML,JSON
  62. -
  63. -
  64. * - DELETE
  65. - Delete layer group ``lg``
  66. - 200
  67. -
  68. -
  69. -
  70. Exceptions
  71. ~~~~~~~~~~
  72. .. list-table::
  73. :header-rows: 1
  74. * - Exception
  75. - Status code
  76. * - GET for a layer group that does not exist
  77. - 404
  78. * - POST that specifies layer group with no layers
  79. - 400
  80. * - PUT that changes name of layer group
  81. - 403
  82. Parameters
  83. ~~~~~~~~~~
  84. .. _rest_api_layergroups_quietOnNotFound:
  85. ``quietOnNotFound``
  86. ^^^^^^^^^^^^^^^^^^^^
  87. The ``quietOnNotFound`` parameter avoids to log an Exception when the layergroup is not present. Note that 404 status code will be returned anyway.
  88. ``/workspaces/<ws>/layergroups[.<format>]``
  89. -------------------------------------------
  90. Controls all layer groups in a given workspace.
  91. .. list-table::
  92. :header-rows: 1
  93. * - Method
  94. - Action
  95. - Status code
  96. - Formats
  97. - Default Format
  98. * - GET
  99. - Return all layer groups within workspace ``ws``
  100. - 200
  101. - HTML, XML, JSON
  102. - HTML
  103. * - POST
  104. - Add a new layer group within workspace ``ws``
  105. - 201, with ``Location`` header
  106. - XML,JSON
  107. -
  108. * - PUT
  109. -
  110. - 405
  111. -
  112. -
  113. * - DELETE
  114. -
  115. - 405
  116. -
  117. -
  118. ``/workspaces/<ws>/layergroups/<lg>[.<format>]``
  119. ------------------------------------------------
  120. Controls a particular layer group in a given workspace.
  121. .. list-table::
  122. :header-rows: 1
  123. * - Method
  124. - Action
  125. - Status code
  126. - Formats
  127. - Default Format
  128. -
  129. * - GET
  130. - Return layer group ``lg`` within workspace ``ws``
  131. - 200
  132. - HTML, XML, JSON
  133. - HTML
  134. - :ref:`quietOnNotFound <rest_api_layergroups_quietOnNotFound>`
  135. * - POST
  136. -
  137. - 405
  138. -
  139. -
  140. -
  141. * - PUT
  142. - Modify layer group ``lg`` within workspace ``ws``
  143. - 200
  144. - XML,JSON
  145. -
  146. -
  147. * - DELETE
  148. - Delete layer group ``lg`` within workspace ``ws``
  149. - 200
  150. -
  151. -
  152. -
  153. Exceptions
  154. ~~~~~~~~~~
  155. .. list-table::
  156. :header-rows: 1
  157. * - Exception
  158. - Status code
  159. * - GET for a layer group that does not exist for that workspace
  160. - 404