1
0

info.asciidoc 4.3 KB

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