info.asciidoc 3.9 KB

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