# Not able to make API call on Elasticsearch 6.x for index pattern management

**URL:** <https://discuss.elastic.co/t/not-able-to-make-api-call-on-elasticsearch-6-x-for-index-pattern-management/167932>\
**Category:** Elasticsearch\
**Created:** [February 11, 2019, 9:48pm UTC](https://discuss.elastic.co/t/not-able-to-make-api-call-on-elasticsearch-6-x-for-index-pattern-management/167932 "2019-02-11T21:48:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![preddy75](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@preddy75](https://discuss.elastic.co/u/preddy75)\
**Post date:** [February 11, 2019, 9:48pm UTC](https://discuss.elastic.co/t/not-able-to-make-api-call-on-elasticsearch-6-x-for-index-pattern-management/167932/1 "2019-02-11T21:48:14Z")

</div>

We used to make the call below to Elasticsearch to get configuration information during kibana index management jobs. After moving from 5.x to 6.x I get this error:

2019-02-11 21:00:51,450 ERROR Unable to connect to Elasticsearch to get kibana version: 404 - {"\_index":".kibana","\_type":"config","\_id":"6.4.0","found":false}

Here is context of the error (see call in bold)

# get default kibana version

```
**res = get("/.kibana/config/" + kibana_version)**
res_body = res.read()
if res.status >= 400:
    logging.error("Unable to connect to Elasticsearch to get kibana version: " + str(res.status) + " - " + res_body)
    exit(1)

try:
    root = json.loads(res_body)
    logging.debug("Response body: ")
    logging.debug(root)
    blob += root["_source"]["defaultIndex"]
    logging.debug('_source"]["defaultIndex"')
except:
    logging.warn("Failed to read default index pattern: " + res_body)
return blob
```

---

<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 11, 2019, 9:48pm UTC](https://discuss.elastic.co/t/not-able-to-make-api-call-on-elasticsearch-6-x-for-index-pattern-management/167932/2 "2019-03-11T21:48:17Z")

</div>

Closed on March 11, 2019, 9:48pm UTC

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