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

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 :

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

or

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
            }
          }

Hello @anna.kuranda

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

Thanks,
Matt

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

Thanks
Anna