# How I can access Elasticsearch API using java sciript

**URL:** https://discuss.elastic.co/t/how-i-can-access-elasticsearch-api-using-java-sciript/32867
**Category:** Elasticsearch
**Created:** [October 23, 2015, 3:46pm UTC](https://discuss.elastic.co/t/how-i-can-access-elasticsearch-api-using-java-sciript/32867 "2015-10-23T15:46:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [October 23, 2015, 3:46pm UTC](https://discuss.elastic.co/t/how-i-can-access-elasticsearch-api-using-java-sciript/32867/1 "2015-10-23T15:46:32Z")

</div>

Hi Experts,

I just need a start , actually I am totally new to java scripting and I want to connect to Elasticsearch API to show cluster health on my html page . I know for this we have lots of plugins available which can show cluster health like head, kopf etc but I want to create my own HTML page .I want to show something like.

Cluster name  
Number of nodes  
Number of data nodes  
Active primary shards  
Active shards  
Relocating shards  
Initializing shards  
Unassigned shards  
Any help on this will be greatly appreciated. Thanks in advance  
VG

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [October 23, 2015, 4:56pm UTC](https://discuss.elastic.co/t/how-i-can-access-elasticsearch-api-using-java-sciript/32867/2 "2015-10-23T16:56:12Z")

</div>

Hi, we have an official javascript client over at [Github](https://github.com/elastic/elasticsearch-js) with a lot of documentation on getting started. Hope you find it useful.

---

<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: [July 5, 2017, 11:42pm UTC](https://discuss.elastic.co/t/how-i-can-access-elasticsearch-api-using-java-sciript/32867/3 "2017-07-05T23:42:58Z")

</div>


