info.asciidoc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. "graph" : {
  52. "description" : "Graph Data Exploration for the Elastic Stack",
  53. "available" : true,
  54. "enabled" : true
  55. },
  56. "ilm" : {
  57. "description" : "Index lifecycle management for the Elastic Stack",
  58. "available" : true,
  59. "enabled" : true
  60. },
  61. "logstash" : {
  62. "description" : "Logstash management component for X-Pack",
  63. "available" : true,
  64. "enabled" : true
  65. },
  66. "ml" : {
  67. "description" : "Machine Learning for the Elastic Stack",
  68. "available" : true,
  69. "enabled" : true,
  70. "native_code_info" : {
  71. "version" : "7.0.0-alpha1-SNAPSHOT",
  72. "build_hash" : "99a07c016d5a73"
  73. }
  74. },
  75. "monitoring" : {
  76. "description" : "Monitoring for the Elastic Stack",
  77. "available" : true,
  78. "enabled" : true
  79. },
  80. "rollup": {
  81. "description": "Time series pre-aggregation and rollup",
  82. "available": true,
  83. "enabled": true
  84. },
  85. "security" : {
  86. "description" : "Security for the Elastic Stack",
  87. "available" : true,
  88. "enabled" : false
  89. },
  90. "watcher" : {
  91. "description" : "Alerting, Notification and Automation for the Elastic Stack",
  92. "available" : true,
  93. "enabled" : true
  94. }
  95. },
  96. "tagline" : "You know, for X"
  97. }
  98. ------------------------------------------------------------
  99. // TESTRESPONSE[s/"hash" : "2798b1a3ce779b3611bb53a0082d4d741e4d3168",/"hash" : "$body.build.hash",/]
  100. // TESTRESPONSE[s/"date" : "2015-04-07T13:34:42Z"/"date" : "$body.build.date"/]
  101. // TESTRESPONSE[s/"uid" : "893361dc-9749-4997-93cb-xxx",/"uid": "$body.license.uid",/]
  102. // TESTRESPONSE[s/"expiry_date_in_millis" : 1542665112332/"expiry_date_in_millis" : "$body.license.expiry_date_in_millis"/]
  103. // TESTRESPONSE[s/"version" : "7.0.0-alpha1-SNAPSHOT",/"version": "$body.features.ml.native_code_info.version",/]
  104. // TESTRESPONSE[s/"build_hash" : "99a07c016d5a73"/"build_hash": "$body.features.ml.native_code_info.build_hash"/]
  105. // So much s/// but at least we test that the layout is close to matching....
  106. The following example only returns the build and features information:
  107. [source,js]
  108. ------------------------------------------------------------
  109. GET /_xpack?categories=build,features
  110. ------------------------------------------------------------
  111. // CONSOLE
  112. The following example removes the descriptions from the response:
  113. [source,js]
  114. ------------------------------------------------------------
  115. GET /_xpack?human=false
  116. ------------------------------------------------------------
  117. // CONSOLE