# Run kibana commands from java apache Http (or other java rest client)

**URL:** <https://discuss.elastic.co/t/run-kibana-commands-from-java-apache-http-or-other-java-rest-client/283751>\
**Category:** Kibana\
**Created:** [September 9, 2021, 8:10am UTC](https://discuss.elastic.co/t/run-kibana-commands-from-java-apache-http-or-other-java-rest-client/283751 "2021-09-09T08:10:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anna.kuranda](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@anna.kuranda](https://discuss.elastic.co/u/anna.kuranda)\
**Post date:** [September 9, 2021, 8:10am UTC](https://discuss.elastic.co/t/run-kibana-commands-from-java-apache-http-or-other-java-rest-client/283751/1 "2021-09-09T08:10:03Z")

</div>

Hi,  
is there way run kibana rest from java apache http client (or other java rest client)?  
what url to use ?  
for example run in apache http :

```auto
PUT %3Cbase_elements_rwr-%7Bnow%2Fd%7D-000001%3E
{
"aliases": {
   "baseelements_rwr": {
     "is_write_index": false
   }
}
}

```

or

```auto
PUT /_index_template/rwr_template
{
  "index_patterns": [
    "*base_elements_rwr*"
  ],
  "priority": 0,
  "template": {
    "settings": {
      "index.lifecycle.name": "rwr_size_policy",
      "index.lifecycle.rollover_alias": "baseelements_rwr",
      "index.lifecycle.parse_origination_date":true,
      
      "number_of_shards": 1,
      "number_of_replicas": 0
      
    },
    "mappings": {
      "properties": {
        "sessionId": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }

```

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [September 14, 2021, 12:47pm UTC](https://discuss.elastic.co/t/run-kibana-commands-from-java-apache-http-or-other-java-rest-client/283751/2 "2021-09-14T12:47:38Z")

</div>

Hello @anna.kuranda

Which version of the elastic stack are you running? What kind of actions do you need to perform?

Thanks,  
Matt

---

<div class="post-metadata">

**Author:** ![anna.kuranda](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@anna.kuranda](https://discuss.elastic.co/u/anna.kuranda)\
**Post date:** [September 22, 2021, 5:56am UTC](https://discuss.elastic.co/t/run-kibana-commands-from-java-apache-http-or-other-java-rest-client/283751/3 "2021-09-22T05:56:02Z")

</div>

Hello @mattkime  
I run ver7.13  
Looks like I found the correct way.  
Just use low level rest client from java

Thanks  
Anna

---

<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:** [October 20, 2021, 5:56am UTC](https://discuss.elastic.co/t/run-kibana-commands-from-java-apache-http-or-other-java-rest-client/283751/4 "2021-10-20T05:56:39Z")

</div>

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