1
0

root.asciidoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. [[rest-api-root]]
  2. == Root API
  3. ++++
  4. <titleabbrev>Root API</titleabbrev>
  5. ++++
  6. .New API reference
  7. [sidebar]
  8. --
  9. For the most up-to-date API details, refer to {api-es}/group/endpoint-info[Info APIs].
  10. --
  11. The Elasticsearch API's base url returns its basic build,
  12. version, and cluster information.
  13. [source,console]
  14. --------------------------------------------------
  15. GET /
  16. --------------------------------------------------
  17. [discrete]
  18. [[rest-api-root-prereq]]
  19. === {api-prereq-title}
  20. * If the {es} {security-features} are enabled, you must have the
  21. `monitor`, `manage`, or `all`
  22. <<privileges-list-cluster,cluster privilege>> to use this API.
  23. [role="child_attributes"]
  24. [discrete]
  25. [[rest-api-root-response-body]]
  26. === {api-response-body-title}
  27. `name` ::
  28. The responding <<node-name,Node's `name`>>.
  29. `cluster_name` ::
  30. The responding <<cluster-name,Cluster's `name`>>.
  31. `cluster_uuid` ::
  32. The responding Cluster's `uuid` as confirmed by
  33. <<cluster-state,Cluster State>>.
  34. `version` ::
  35. (object)
  36. Contains information about the running version of Elasticsearch.
  37. + properties of `version`
  38. [%collapsible%open]
  39. ====
  40. `number` ::
  41. Version number of responding
  42. https://www.elastic.co/downloads/past-releases#elasticsearch[Elasticsearch release].
  43. `build_flavor` ::
  44. Build flavor, e.g. `default`.
  45. `build_type` ::
  46. Build type corresponding to how
  47. <<install-elasticsearch,Elasticsearch was installed>,
  48. e.g. `docker`, `rpm`, `tar`.
  49. `build_hash` ::
  50. Elasticsearch's Git commit's SHA hash.
  51. `build_date` ::
  52. Elasticsearch's Git commit's date.
  53. `build_snapshot` ::
  54. If Elasticsearch's build was from a snapshot.
  55. `lucene_version` ::
  56. Version number of Elasticsearch's
  57. <<https://archive.apache.org/dist/lucene/java/,underlying Lucene software>>.
  58. `minimum_wire_compatibility_version` ::
  59. Minimum node version with which the responding node can
  60. communicate. Also minimum version from which you can perform
  61. a <<rolling-upgrades,Rolling Upgrade>>.
  62. `minimum_index_compatibility_version` ::
  63. Minimum index version with which the responding node can read
  64. from disk.
  65. ====
  66. [discrete]
  67. [[rest-api-root-response-example]]
  68. === {api-examples-title}
  69. The API returns the following response:
  70. [source,console-result]
  71. ----
  72. {
  73. "name": "instance-0000000000",
  74. "cluster_name": "my_test_cluster",
  75. "cluster_uuid": "5QaxoN0pRZuOmWSxstBBwQ",
  76. "version": {
  77. "build_date": "2024-02-01T13:07:13.727175297Z",
  78. "minimum_wire_compatibility_version": "7.17.0",
  79. "build_hash": "6185ba65d27469afabc9bc951cded6c17c21e3f3",
  80. "number": "8.12.1",
  81. "lucene_version": "9.9.2",
  82. "minimum_index_compatibility_version": "7.0.0",
  83. "build_flavor": "default",
  84. "build_snapshot": false,
  85. "build_type": "docker"
  86. },
  87. "tagline": "You Know, for Search"
  88. }
  89. ----
  90. // TESTRESPONSE[s/"name": "instance-0000000000"/"name": "$body.name"/]
  91. // TESTRESPONSE[s/"cluster_name": "my_test_cluster"/"cluster_name": "$body.cluster_name"/]
  92. // TESTRESPONSE[s/"cluster_uuid": "5QaxoN0pRZuOmWSxstBBwQ"/"cluster_uuid": "$body.cluster_uuid"/]
  93. // TESTRESPONSE[s/"build_date": "2024-02-01T13:07:13.727175297Z"/"build_date": "$body.version.build_date"/]
  94. // TESTRESPONSE[s/"minimum_wire_compatibility_version": "7.17.0"/"minimum_wire_compatibility_version": "$body.version.minimum_wire_compatibility_version"/]
  95. // TESTRESPONSE[s/"build_hash": "6185ba65d27469afabc9bc951cded6c17c21e3f3"/"build_hash": "$body.version.build_hash"/]
  96. // TESTRESPONSE[s/"number": "8.12.1"/"number": "$body.version.number"/]
  97. // TESTRESPONSE[s/"lucene_version": "9.9.2"/"lucene_version": "$body.version.lucene_version"/]
  98. // TESTRESPONSE[s/"minimum_index_compatibility_version": "7.0.0"/"minimum_index_compatibility_version": "$body.version.minimum_index_compatibility_version"/]
  99. // TESTRESPONSE[s/"build_flavor": "default"/"build_flavor": "$body.version.build_flavor"/]
  100. // TESTRESPONSE[s/"build_snapshot": false/"build_snapshot": "$body.version.build_snapshot"/]
  101. // TESTRESPONSE[s/"build_type": "docker"/"build_type": "$body.version.build_type"/]