about.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. .. _rest_about:
  2. About
  3. =====
  4. The REST API allows you to set and retrieve information about the server itself.
  5. .. note:: Read the `API reference for /about/manifests <manifests.yaml>__`.
  6. Retrieving component versions
  7. -----------------------------
  8. **Retrieve the versions of the main components: GeoServer, GeoTools, and GeoWebCache**
  9. *Request*
  10. .. admonition:: curl
  11. ::
  12. curl -v -u admin:geoserver -XGET -H "Accept: text/xml"
  13. http://localhost:8080/geoserver/rest/about/version.xml
  14. *Response*
  15. .. code-block:: xml
  16. <about>
  17. <resource name="GeoServer">
  18. <Build-Timestamp>11-Dec-2012 17:55</Build-Timestamp>
  19. <Git-Revision>e66f8da85521f73d0fd00b71331069a5f49f7865</Git-Revision>
  20. <Version>2.3-SNAPSHOT</Version>
  21. </resource>
  22. <resource name="GeoTools">
  23. <Build-Timestamp>04-Dec-2012 02:31</Build-Timestamp>
  24. <Git-Revision>380a2b8545ee9221f1f2d38a4f10ef77a23bccae</Git-Revision>
  25. <Version>9-SNAPSHOT</Version>
  26. </resource>
  27. <resource name="GeoWebCache">
  28. <Git-Revision>2a534f91f6b99e5120a9eaa5db62df771dd01688</Git-Revision>
  29. <Version>1.3-SNAPSHOT</Version>
  30. </resource>
  31. </about>
  32. Retrieving manifests
  33. --------------------
  34. **Retrieve the full manifest and subsets of the manifest as known to the ClassLoader**
  35. *Request*
  36. .. admonition:: curl
  37. ::
  38. curl -v -u admin:geoserver -XGET -H "Accept: text/xml"
  39. http://localhost:8080/geoserver/rest/about/manifest.xml
  40. .. note:: The result will be a very long list of manifest information. While this can be useful, it is often desirable to filter this list.
  41. **Retrieve manifests, filtered by resource name**
  42. .. note:: This example will retrieve only resources where the ``name`` attribute matches ``gwc-.*``.
  43. *Request*
  44. .. admonition:: curl
  45. ::
  46. curl -v -u admin:geoserver -XGET -H "Accept: text/xml"
  47. http://localhost:8080/geoserver/rest/about/manifest.xml?manifest=gwc-.*
  48. *Response*
  49. .. code-block:: xml
  50. <about>
  51. <resource name="gwc-2.3.0">
  52. ...
  53. </resource>
  54. <resource name="gwc-core-1.4.0">
  55. ...
  56. </resource>
  57. <resource name="gwc-diskquota-core-1.4.0">
  58. ...
  59. </resource>
  60. <resource name="gwc-diskquota-jdbc-1.4.0">
  61. ...
  62. </resource>
  63. <resource name="gwc-georss-1.4.0">
  64. ...
  65. </resource>
  66. <resource name="gwc-gmaps-1.4.0">
  67. ...
  68. </resource>
  69. <resource name="gwc-kml-1.4.0">
  70. ...
  71. </resource>
  72. <resource name="gwc-rest-1.4.0">
  73. ...
  74. </resource>
  75. <resource name="gwc-tms-1.4.0">
  76. ...
  77. </resource>
  78. <resource name="gwc-ve-1.4.0">
  79. ...
  80. </resource>
  81. <resource name="gwc-wms-1.4.0">
  82. ...
  83. </resource>
  84. <resource name="gwc-wmts-1.4.0">
  85. ...
  86. </resource>
  87. </about>
  88. **Retrieve manifests, filtered by resource property**
  89. .. note:: This example will retrieve only resources with a property equal to ``GeoServerModule``.
  90. *Request*
  91. .. admonition:: curl
  92. ::
  93. curl -u admin:geoserver -XGET -H "Accept: text/xml"
  94. http://localhost:8080/geoserver/rest/about/manifest.xml?key=GeoServerModule
  95. *Response*
  96. .. code-block:: xml
  97. <about>
  98. <resource name="control-flow-2.3.0">
  99. <GeoServerModule>extension</GeoServerModule>
  100. ...
  101. </resource>
  102. ...
  103. <resource name="wms-2.3.0">
  104. <GeoServerModule>core</GeoServerModule>
  105. ...
  106. </resource>
  107. </about>
  108. **Retrieve manifests, filtered by both resource name and property**
  109. .. note:: This example will retrieve only resources where a property with named ``GeoServerModule`` has a value equal to ``extension``.\
  110. *Request*
  111. .. admonition:: curl
  112. ::
  113. curl -u admin:geoserver -XGET -H "Accept: text/xml"
  114. http://localhost:8080/geoserver/rest/about/manifest.xml?key=GeoServerModule&value=extension
  115. System Status
  116. -------------
  117. It is possible to request the available system information (monitoring data) through the GeoServer REST API. The supported formats are XML, JSON and HTML.
  118. The available REST endpoints are: ::
  119. /geoserver/rest/about/system-status
  120. /geoserver/rest/about/system-status.json
  121. /geoserver/rest/about/system-status.xml
  122. /geoserver/rest/about/system-status.html
  123. The HTML representation of the system data is equal to the ``System status`` tab representation:
  124. .. figure:: img/resthtml.png
  125. System status
  126. The XML and JSON representations are quite similar. For each system information metric, the following attributes will be available:
  127. .. list-table::
  128. :widths: 40 60
  129. * - **Name**
  130. - **Description**
  131. * - name
  132. - name of the metric
  133. * - available
  134. - TRUE if the system information value is available
  135. * - description
  136. - description of this system information
  137. * - unit
  138. - unit of the system information, can be empty
  139. * - category
  140. - category of this system information
  141. * - priority
  142. - this value can be used to render the metrics in a predefined order
  143. * - identifier
  144. - identifies the resource associated with the metric, e.g. file partition name
  145. Example of XML representation:
  146. .. code-block:: xml
  147. <metrics>
  148. <metric>
  149. <value>99614720</value>
  150. <available>true</available>
  151. <description>Partition [/dev/nvme0n1p2] total space</description>
  152. <name>PARTITION_TOTAL</name>
  153. <unit>bytes</unit>
  154. <category>FILE_SYSTEM</category>
  155. <identifier>/dev/nvme0n1p2</identifier>
  156. <priority>507</priority>
  157. </metric>
  158. (...)
  159. Example of JSON representation:
  160. .. code-block:: json
  161. {
  162. "metrics": {
  163. "metric": [
  164. {
  165. "available": true,
  166. "category": "FILE_SYSTEM",
  167. "description": "Partition [/dev/nvme0n1p2] total space",
  168. "identifier": "/dev/nvme0n1p2",
  169. "name": "PARTITION_TOTAL",
  170. "priority": 507,
  171. "unit": "bytes",
  172. "value": 99614720
  173. },