namespaces.rst 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. .. _rest_api_namespaces:
  2. Namespaces
  3. ==========
  4. A ``namespace`` is a uniquely identifiable grouping of feature types. It is identified by a prefix and a URI.
  5. ``/namespaces[.<format>]``
  6. --------------------------
  7. Controls all namespaces.
  8. .. list-table::
  9. :header-rows: 1
  10. * - Method
  11. - Action
  12. - Status code
  13. - Formats
  14. - Default Format
  15. * - GET
  16. - List all namespaces
  17. - 200
  18. - HTML, XML, JSON
  19. - HTML
  20. * - POST
  21. - Create a new namespace
  22. - 201 with ``Location`` header
  23. - XML, JSON
  24. -
  25. * - PUT
  26. -
  27. - 405
  28. -
  29. -
  30. * - DELETE
  31. -
  32. - 405
  33. -
  34. -
  35. ``/namespaces/<ns>[.<format>]``
  36. -------------------------------
  37. Controls a particular namespace.
  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 namespace ``ns``
  48. - 200
  49. - HTML, XML, JSON
  50. - HTML
  51. - :ref:`quietOnNotFound <rest_api_namespaces_quietOnNotFound>`
  52. * - POST
  53. -
  54. - 405
  55. -
  56. -
  57. -
  58. * - PUT
  59. - 200
  60. - Modify namespace ``ns``
  61. - XML, JSON
  62. -
  63. -
  64. * - DELETE
  65. - 200
  66. - Delete namespace ``ns``
  67. - XML, JSON
  68. -
  69. -
  70. Exceptions
  71. ~~~~~~~~~~
  72. .. list-table::
  73. :header-rows: 1
  74. * - Exception
  75. - Status code
  76. * - GET for a namespace that does not exist
  77. - 404
  78. * - PUT that changes prefix of namespace
  79. - 403
  80. * - DELETE against a namespace whose corresponding workspace is non-empty
  81. - 403
  82. Parameters
  83. ~~~~~~~~~~
  84. .. _rest_api_namespaces_quietOnNotFound:
  85. ``quietOnNotFound``
  86. ^^^^^^^^^^^^^^^^^^^^
  87. The ``quietOnNotFound`` parameter avoids to log an Exception when the Namespace is not present. Note that 404 status code will be returned anyway.
  88. ``/namespaces/default[.<format>]``
  89. ----------------------------------
  90. Controls the default namespace.
  91. .. list-table::
  92. :header-rows: 1
  93. * - Method
  94. - Action
  95. - Status code
  96. - Formats
  97. - Default Format
  98. * - GET
  99. - Return default namespace
  100. - 200
  101. - HTML, XML, JSON
  102. - HTML
  103. * - POST
  104. -
  105. - 405
  106. -
  107. -
  108. * - PUT
  109. - 200
  110. - Set default namespace
  111. - XML, JSON
  112. -
  113. * - DELETE
  114. -
  115. - 405
  116. -
  117. -