info.asciidoc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[info-api]]
  4. == Info API
  5. The info API provides general information about the installed {xpack} features.
  6. [float]
  7. === Request
  8. `GET /_xpack`
  9. [float]
  10. === Description
  11. The information provided by this API includes:
  12. * Build Information - including the build number and timestamp.
  13. * License Information - basic information about the currently installed license.
  14. * Features Information - The features that are currently enabled and available
  15. under the current license.
  16. [float]
  17. === Path Parameters
  18. `categories`::
  19. (list) A comma-separated list of the information categories to include in the
  20. response. For example, `build,license,features`.
  21. `human`::
  22. (boolean) Defines whether additional human-readable information is included in
  23. the response. In particular, it adds descriptions and a tag line. The
  24. default value is `true`.
  25. //=== Query Parameters
  26. //=== Authorization
  27. [float]
  28. === Examples
  29. The following example queries the info API:
  30. [source,js]
  31. ------------------------------------------------------------
  32. GET /_xpack
  33. ------------------------------------------------------------
  34. // CONSOLE
  35. Example response:
  36. [source,js]
  37. ------------------------------------------------------------
  38. {
  39. "build" : {
  40. "hash" : "2798b1a3ce779b3611bb53a0082d4d741e4d3168",
  41. "date" : "2015-04-07T13:34:42Z"
  42. },
  43. "license" : {
  44. "uid" : "893361dc-9749-4997-93cb-xxx",
  45. "type" : "trial",
  46. "mode" : "trial",
  47. "status" : "active",
  48. "expiry_date_in_millis" : 1542665112332
  49. },
  50. "features" : {
  51. "ccr" : {
  52. "description" : "Cross Cluster Replication",
  53. "available" : true,
  54. "enabled" : true
  55. },
  56. "data_frame" : {
  57. "description" : "Data Frame for the Elastic Stack",
  58. "available" : true,
  59. "enabled" : true
  60. },
  61. "graph" : {
  62. "description" : "Graph Data Exploration for the Elastic Stack",
  63. "available" : true,
  64. "enabled" : true
  65. },
  66. "ilm" : {
  67. "description" : "Index lifecycle management for the Elastic Stack",
  68. "available" : true,
  69. "enabled" : true
  70. },
  71. "logstash" : {
  72. "description" : "Logstash management component for X-Pack",
  73. "available" : true,
  74. "enabled" : true
  75. },
  76. "ml" : {
  77. "description" : "Machine Learning for the Elastic Stack",
  78. "available" : true,
  79. "enabled" : true,
  80. "native_code_info" : {
  81. "version" : "7.0.0-alpha1-SNAPSHOT",
  82. "build_hash" : "99a07c016d5a73"
  83. }
  84. },
  85. "monitoring" : {
  86. "description" : "Monitoring for the Elastic Stack",
  87. "available" : true,
  88. "enabled" : true
  89. },
  90. "rollup": {
  91. "description": "Time series pre-aggregation and rollup",
  92. "available": true,
  93. "enabled": true
  94. },
  95. "security" : {
  96. "description" : "Security for the Elastic Stack",
  97. "available" : true,
  98. "enabled" : false
  99. },
  100. "sql" : {
  101. "description" : "SQL access to Elasticsearch",
  102. "available" : true,
  103. "enabled" : true
  104. },
  105. "watcher" : {
  106. "description" : "Alerting, Notification and Automation for the Elastic Stack",
  107. "available" : true,
  108. "enabled" : true
  109. }
  110. },
  111. "tagline" : "You know, for X"
  112. }
  113. ------------------------------------------------------------
  114. // TESTRESPONSE[s/"hash" : "2798b1a3ce779b3611bb53a0082d4d741e4d3168",/"hash" : "$body.build.hash",/]
  115. // TESTRESPONSE[s/"date" : "2015-04-07T13:34:42Z"/"date" : "$body.build.date"/]
  116. // TESTRESPONSE[s/"uid" : "893361dc-9749-4997-93cb-xxx",/"uid": "$body.license.uid",/]
  117. // TESTRESPONSE[s/"expiry_date_in_millis" : 1542665112332/"expiry_date_in_millis" : "$body.license.expiry_date_in_millis"/]
  118. // TESTRESPONSE[s/"version" : "7.0.0-alpha1-SNAPSHOT",/"version": "$body.features.ml.native_code_info.version",/]
  119. // TESTRESPONSE[s/"build_hash" : "99a07c016d5a73"/"build_hash": "$body.features.ml.native_code_info.build_hash"/]
  120. // So much s/// but at least we test that the layout is close to matching....
  121. The following example only returns the build and features information:
  122. [source,js]
  123. ------------------------------------------------------------
  124. GET /_xpack?categories=build,features
  125. ------------------------------------------------------------
  126. // CONSOLE
  127. The following example removes the descriptions from the response:
  128. [source,js]
  129. ------------------------------------------------------------
  130. GET /_xpack?human=false
  131. ------------------------------------------------------------
  132. // CONSOLE