# Clarification regarding java api

**URL:** <https://discuss.elastic.co/t/clarification-regarding-java-api/377957>\
**Category:** Elasticsearch\
**Created:** [May 8, 2025, 9:07pm UTC](https://discuss.elastic.co/t/clarification-regarding-java-api/377957 "2025-05-08T21:07:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [May 8, 2025, 9:07pm UTC](https://discuss.elastic.co/t/clarification-regarding-java-api/377957/1 "2025-05-08T21:07:09Z")

</div>

Is this only applicable to java code? Python will still continue to use rest call?  
I am having a very difficult time to find a documentation with comprehensive examples of various calls using java api; therefore, it's almost impossible for me to translate from REST to java api.

If this api is only designed for java, that means I should still be able to continue using REST calls from java, right? It's just that the REST library will not be maintained going forward.

Is my understanding correct?

Thanks.

---

<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:** [May 8, 2025, 10:44pm UTC](https://discuss.elastic.co/t/clarification-regarding-java-api/377957/2 "2025-05-08T22:44:59Z")

</div>

May be this could help:

> **[Switching from the Java High Level Rest Client to the new Java API Client](https://www.elastic.co/blog/switching-from-the-java-high-level-rest-client-to-the-new-java-api-client)**
>
> Let's say you have a Java project using Elastic 7.17 and the deprecated High Level Rest Client (HLRC). You have been asked to switch to Elastic 8.11 but the HLRC does not exist for this version. This ...

It's a blog post I wrote a long time ago and in the middle of it you will find how I'm using the IDE to help me building my code.

HTH

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [May 9, 2025, 12:23am UTC](https://discuss.elastic.co/t/clarification-regarding-java-api/377957/3 "2025-05-09T00:23:10Z")

</div>

In your forum, the reference to RestClient when creating the api client.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/a/ba0fb4c018689f2e80c17a7025f9c61044378c71.png)

Does that package come from org.elasticsearch or co.elastic.client?  
I can't find it under co.elastic.\*

---

<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:** [May 9, 2025, 12:56am UTC](https://discuss.elastic.co/t/clarification-regarding-java-api/377957/4 "2025-05-09T00:56:47Z")

</div>

It used to be org.elasticsearch but I think it changed with the client v9.  
So it depends on what you are using as a version.

---

<div class="post-metadata">

**Author:** ![linkerc](https://avatars.discourse-cdn.com/v4/letter/l/13edae/32.png) [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Post date:** [May 9, 2025, 5:17pm UTC](https://discuss.elastic.co/t/clarification-regarding-java-api/377957/5 "2025-05-09T17:17:23Z")

</div>

ok. org.elasticsearch is going away though, right?  
I'll check version 9. I'm using 7.x.

We are using basic auth so the official doc's example of using api key doesn't apply to us.  
This is the issue I'm having with migration. Taking tens of minutes if not hours just to change each call.  
Do you know if this is only for java? Python still uses REST client?  
I guess my point is trying to figure out if REST api is going away in the future or not.

Thanks.
