layers.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .. _rest_api_layers:
  2. Layers
  3. ======
  4. A ``layer`` is a *published* resource (feature type or coverage).
  5. ``/layers[.<format>]``
  6. ----------------------
  7. Controls all layers.
  8. .. list-table::
  9. :header-rows: 1
  10. * - Method
  11. - Action
  12. - Status code
  13. - Formats
  14. - Default Format
  15. * - GET
  16. - Return all layers
  17. - 200
  18. - HTML, XML, JSON
  19. - HTML
  20. * - POST
  21. -
  22. - 405
  23. -
  24. -
  25. * - PUT
  26. -
  27. - 405
  28. -
  29. -
  30. * - DELETE
  31. -
  32. - 405
  33. -
  34. -
  35. ``/layers/<l>[.<format>]``
  36. --------------------------
  37. Controls a particular layer.
  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 ``l``
  48. - 200
  49. - HTML, XML, JSON
  50. - HTML
  51. - :ref:`quietOnNotFound <rest_api_layers_quietOnNotFound>`
  52. * - POST
  53. -
  54. - 405
  55. -
  56. -
  57. -
  58. * - PUT
  59. - Modify layer ``l``
  60. - 200
  61. - XML,JSON
  62. -
  63. -
  64. * - DELETE
  65. - Delete layer ``l``
  66. - 200
  67. -
  68. -
  69. - :ref:`recurse <rest_api_layers_recurse>`
  70. Exceptions
  71. ~~~~~~~~~~
  72. .. list-table::
  73. :header-rows: 1
  74. * - Exception
  75. - Status code
  76. * - GET for a layer that does not exist
  77. - 404
  78. * - PUT that changes name of layer
  79. - 403
  80. * - PUT that changes resource of layer
  81. - 403
  82. Parameters
  83. ~~~~~~~~~~
  84. .. _rest_api_layers_recurse:
  85. ``recurse``
  86. ^^^^^^^^^^^
  87. The ``recurse`` parameter recursively deletes all styles referenced by the specified layer. Allowed values for this parameter are "true" or "false". The default value is "false".
  88. .. _rest_api_layers_quietOnNotFound:
  89. ``quietOnNotFound``
  90. ^^^^^^^^^^^^^^^^^^^^
  91. The ``quietOnNotFound`` parameter avoids to log an Exception when the layer is not present. Note that 404 status code will be returned anyway.
  92. ``/layers/<l>/styles[.<format>]``
  93. ---------------------------------
  94. Controls all styles in a given layer.
  95. .. list-table::
  96. :header-rows: 1
  97. * - Method
  98. - Action
  99. - Status code
  100. - Formats
  101. - Default Format
  102. * - GET
  103. - Return all styles for layer ``l``
  104. - 200
  105. - SLD, HTML, XML, JSON
  106. - HTML
  107. * - POST
  108. - Add a new style to layer ``l``
  109. - 201, with ``Location`` header
  110. - XML, JSON
  111. -
  112. * - PUT
  113. -
  114. - 405
  115. -
  116. -
  117. * - DELETE
  118. -
  119. - 405
  120. -
  121. -