# How to get version of the es server using Java Api client

**URL:** <https://discuss.elastic.co/t/how-to-get-version-of-the-es-server-using-java-api-client/325796>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 17, 2023, 2:35am UTC](https://discuss.elastic.co/t/how-to-get-version-of-the-es-server-using-java-api-client/325796 "2023-02-17T02:35:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![4color](https://avatars.discourse-cdn.com/v4/letter/4/a8b319/32.png) [@4color](https://discuss.elastic.co/u/4color)\
**Post date:** [February 17, 2023, 2:35am UTC](https://discuss.elastic.co/t/how-to-get-version-of-the-es-server-using-java-api-client/325796/1 "2023-02-17T02:35:29Z")

</div>

i can't find api in source

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 17, 2023, 2:50am UTC](https://discuss.elastic.co/t/how-to-get-version-of-the-es-server-using-java-api-client/325796/2 "2023-02-17T02:50:17Z")

</div>

> <https://github.com/dadoonet/injector/blob/66c71f4f6c2deb788341a900fb4b22fe0f6556a7/src/main/java/fr/pilato/elasticsearch/injector/injector/ElasticsearchInjector.java#L96-97>

---

<div class="post-metadata">

**Author:** ![4color](https://avatars.discourse-cdn.com/v4/letter/4/a8b319/32.png) [@4color](https://discuss.elastic.co/u/4color)\
**Post date:** [February 17, 2023, 3:08am UTC](https://discuss.elastic.co/t/how-to-get-version-of-the-es-server-using-java-api-client/325796/3 "2023-02-17T03:08:03Z")

</div>

> [@dadoonet](#):
>
> ` InfoResponse info = client.info();`

it works,thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2023, 3:08am UTC](https://discuss.elastic.co/t/how-to-get-version-of-the-es-server-using-java-api-client/325796/4 "2023-03-17T03:08:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
