# Index-pattern created via Kibana API not operational in UI

**URL:** https://discuss.elastic.co/t/index-pattern-created-via-kibana-api-not-operational-in-ui/221418
**Category:** Kibana
**Created:** [February 28, 2020, 11:37am UTC](https://discuss.elastic.co/t/index-pattern-created-via-kibana-api-not-operational-in-ui/221418 "2020-02-28T11:37:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![serhii.zaidlin](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@serhii.zaidlin](https://discuss.elastic.co/u/serhii.zaidlin)
#### Post date: [February 28, 2020, 11:37am UTC](https://discuss.elastic.co/t/index-pattern-created-via-kibana-api-not-operational-in-ui/221418/1 "2020-02-28T11:37:31Z")

</div>

Hi,  
I'm trying to create index-pattern via Kibana API. Everything looks fine - I make POST request, receive 200 and I can see this object in .kibana index.  
When I'm trying to access this pattern via Kibana UI (either Index Pattern or Discovery tabs) - I see this pattern in the list, but when I click on it - nothing happens, Kibana continues to use default pattern, which was loaded first. Tried on version 6.7 and 7.4 - same problem on both.  
What am I doing wrong?

The request I'm using to create pattern:

```
curl -X POST 'http://kibana.local/api/saved_objects/index-pattern/test_pattern' -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'{"attributes":{"title":"test-*","fields":"[{\"name\"=>\"@timestamp\", \"type\"=>\"date\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>true}, {\"name\"=>\"@version\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>false, \"readFromDocValues\"=>false}, {\"name\"=>\"@version.keyword\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>true}, {\"name\"=>\"_id\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>false}, {\"name\"=>\"_index\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>false}, {\"name\"=>\"_score\", \"type\"=>\"number\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>false, \"aggregatable\"=>false, \"readFromDocValues\"=>false}, {\"name\"=>\"_source\", \"type\"=>\"_source\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>false, \"aggregatable\"=>false, \"readFromDocValues\"=>false}, {\"name\"=>\"_type\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>false}, {\"name\"=>\"source.ip\", \"type\"=>\"string\", \"count\"=>2, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>false, \"readFromDocValues\"=>false}, {\"name\"=>\"source.ip.keyword\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>true}, {\"name\"=>\"destination.ip\", \"type\"=>\"string\", \"count\"=>2, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>false, \"readFromDocValues\"=>false}, {\"name\"=>\"destination.ip.keyword\", \"type\"=>\"string\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>true}, {:name=>\"source.geo.location\", :type=>\"geo_point\", :count=>0, :scripted=>false, :searchable=>true, :aggregatable=>true, :readFromDocValues=>true}, {:name=>\"destination.geo.location\", :type=>\"geo_point\", :count=>0, :scripted=>false, :searchable=>true, :aggregatable=>true, :readFromDocValues=>true}, {:name=>\"geo.line\", :type=>\"geo_shape\", :count=>0, :scripted=>false, :searchable=>true, :aggregatable=>false, :readFromDocValues=>false}, {\"name\"=>\"source.port\", \"type\"=>\"number\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>true}, {\"name\"=>\"destination.port\", \"type\"=>\"number\", \"count\"=>0, \"scripted\"=>false, \"searchable\"=>true, \"aggregatable\"=>true, \"readFromDocValues\"=>true}]"}}'

```

What I see in Kibana logs:

```
Feb 28 13:06:45 kibana.local kibana[31740]: {"type":"response","@timestamp":"2020-02-28T11:06:44Z","tags":[],"pid":31740,"method":"post","statusCode":200,"req":{"url":"/api/saved_objects/index-pattern/test_pattern?overwrite=false","method":"post","headers":{"host":"kibana.local","user-agent":"curl/7.58.0","accept":"*/*","kbn-xsrf":"true","content-type":"application/json","content-length":"2758","expect":"100-continue"},"remoteAddress":"10.0.0.5","userAgent":"10.0.0.5"},"res":{"statusCode":200,"responseTime":1072,"contentLength":9},"message":"POST /api/saved_objects/index-pattern/test_pattern?overwrite=false 200 1072ms - 9.0B"}

Feb 28 13:07:02 kibana.local kibana[31740]: {"type":"response","@timestamp":"2020-02-28T11:07:01Z","tags":[],"pid":31740,"method":"get","statusCode":200,"req":{"url":"/api/saved_objects/_find?type=index-pattern&fields=title&fields=type&per_page=10000&page=1","method":"get","headers":{"host":"kibana.local","connection":"keep-alive","sec-fetch-dest":"empty","kbn-version":"6.7.1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36","content-type":"application/json","accept":"*/*","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","referer":"https://kibana.local/app/kibana","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9,ru;q=0.8"},"remoteAddress":"10.0.0.5","userAgent":"10.0.0.5","referer":"https://kibana.local/app/kibana"},"res":{"statusCode":200,"responseTime":66,"contentLength":9},"message":"GET /api/saved_objects/_find?type=index-pattern&fields=title&fields=type&per_page=10000&page=1 200 66ms - 9.0B"}
Feb 28 13:07:07 kibana.local kibana[31740]: {"type":"response","@timestamp":"2020-02-28T11:07:07Z","tags":[],"pid":31740,"method":"get","statusCode":200,"req":{"url":"/api/saved_objects/_find?type=index-pattern&fields=title&per_page=10000&page=1","method":"get","headers":{"host":"kibana.local","connection":"keep-alive","sec-fetch-dest":"empty","kbn-version":"6.7.1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36","content-type":"application/json","accept":"*/*","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","referer":"https://kibana.local/app/kibana","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9,ru;q=0.8"},"remoteAddress":"10.0.0.5","userAgent":"10.0.0.5","referer":"https://kibana.local/app/kibana"},"res":{"statusCode":200,"responseTime":154,"contentLength":9},"message":"GET /api/saved_objects/_find?type=index-pattern&fields=title&per_page=10000&page=1 200 154ms - 9.0B"}
```

---

<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 27, 2020, 11:51am UTC](https://discuss.elastic.co/t/index-pattern-created-via-kibana-api-not-operational-in-ui/221418/2 "2020-03-27T11:51:25Z")

</div>

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