workspaces.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. .. _rest_api_workspaces:
  2. Workspaces
  3. ==========
  4. A ``workspace`` is a grouping of data stores. Similar to a namespace, it is used to group data that is related in some way.
  5. ``/workspaces[.<format>]``
  6. --------------------------
  7. Controls all workspaces.
  8. .. list-table::
  9. :header-rows: 1
  10. * - Method
  11. - Action
  12. - Status code
  13. - Formats
  14. - Default Format
  15. * - GET
  16. - List all workspaces
  17. - 200
  18. - HTML, XML, JSON
  19. - HTML
  20. * - POST
  21. - Create a new workspace
  22. - 201 with ``Location`` header
  23. - XML, JSON
  24. -
  25. * - PUT
  26. -
  27. - 405
  28. -
  29. -
  30. * - DELETE
  31. -
  32. - 405
  33. -
  34. -
  35. ``/workspaces/<ws>[.<format>]``
  36. -------------------------------
  37. Controls a specific workspace.
  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 workspace ``ws``
  48. - 200
  49. - HTML, XML, JSON
  50. - HTML
  51. - :ref:`quietOnNotFound <rest_api_workspaces_quietOnNotFound>`
  52. * - POST
  53. -
  54. - 405
  55. -
  56. -
  57. -
  58. * - PUT
  59. - 200
  60. - Modify workspace ``ws``
  61. - XML, JSON
  62. -
  63. -
  64. * - DELETE
  65. - 200
  66. - Delete workspace ``ws``
  67. - XML, JSON
  68. -
  69. - :ref:`recurse <rest_api_workspaces_recurse>`
  70. Exceptions
  71. ~~~~~~~~~~
  72. .. list-table::
  73. :header-rows: 1
  74. * - Exception
  75. - Status code
  76. * - GET for a workspace that does not exist
  77. - 404
  78. * - PUT that changes name of workspace
  79. - 403
  80. * - DELETE against a workspace that is non-empty
  81. - 403
  82. Parameters
  83. ~~~~~~~~~~
  84. .. _rest_api_workspaces_recurse:
  85. ``recurse``
  86. ^^^^^^^^^^^
  87. The ``recurse`` parameter recursively deletes all layers referenced by the specified workspace, including data stores, coverage stores, feature types, and so on. Allowed values for this parameter are "true" or "false". The default value is "false".
  88. .. _rest_api_workspaces_quietOnNotFound:
  89. ``quietOnNotFound``
  90. ^^^^^^^^^^^^^^^^^^^^
  91. The ``quietOnNotFound`` parameter avoids to log an Exception when the Workspace is not present. Note that 404 status code will be returned anyway.
  92. ``/workspaces/default[.<format>]``
  93. ----------------------------------
  94. Controls the default workspace.
  95. .. list-table::
  96. :header-rows: 1
  97. * - Method
  98. - Action
  99. - Status code
  100. - Formats
  101. - Default Format
  102. * - GET
  103. - Returns default workspace
  104. - 200
  105. - HTML, XML, JSON
  106. - HTML
  107. * - POST
  108. -
  109. - 405
  110. -
  111. -
  112. * - PUT
  113. - 200
  114. - Set default workspace
  115. - XML, JSON
  116. -
  117. * - DELETE
  118. -
  119. - 405
  120. -
  121. -
  122. ``/workspaces/<ws>/settings[.<format>]``
  123. ----------------------------------------
  124. Controls settings on a specific workspace.
  125. .. list-table::
  126. :header-rows: 1
  127. * - Method
  128. - Action
  129. - Status code
  130. - Formats
  131. - Default Format
  132. * - GET
  133. - Returns workspace settings
  134. - 200
  135. - HTML, XML, JSON
  136. - HTML
  137. * - POST
  138. -
  139. - 405
  140. -
  141. -
  142. * - PUT
  143. - Creates or updates workspace settings
  144. - 200
  145. - XML, JSON
  146. -
  147. * - DELETE
  148. - Deletes workspace settings
  149. - 200
  150. - XML, JSON
  151. -