1
0

root.asciidoc 3.8 KB

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