# Create new Index Pattern from console

**URL:** <https://discuss.elastic.co/t/create-new-index-pattern-from-console/168991>\
**Category:** Kibana\
**Created:** [February 19, 2019, 10:17am UTC](https://discuss.elastic.co/t/create-new-index-pattern-from-console/168991 "2019-02-19T10:17:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russ91](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@Russ91](https://discuss.elastic.co/u/Russ91)\
**Post date:** [February 19, 2019, 10:17am UTC](https://discuss.elastic.co/t/create-new-index-pattern-from-console/168991/1 "2019-02-19T10:17:11Z")

</div>

I use the Kibana API for this: [https://www.elastic.co/guide/en/kibana/master/saved-objects-api-create.html](https://www.elastic.co/guide/en/kibana/master/saved-objects-api-create.html)  
And it wok. But after installing plugin Searchguard , it don't work. Need autorization.  
I try:

1)Authenticate against Kibana:

$ curl -XPOST -D- '[http://localhost:5601/api/v1/auth/login](http://localhost:5601/api/v1/auth/login)'   
-c /tmp/sg\_cookies   
-H 'Content-Type: application/json'   
-H 'kbn-xsrf: true'   
-d '{"username":"user","password":"password"}'

2)Create an index pattern via the Kibana API:

$ curl -XPOST -D- '[http://localhost:5601/api/saved\_objects/index-pattern](http://localhost:5601/api/saved_objects/index-pattern)'   
-b /tmp/sg\_cookies   
-H 'Content-Type: application/json'   
-H 'kbn-xsrf: true'   
-d '{"attributes":{"title":"logstash-\*","timeFieldName":"@timestamp"}}'

But Authenticate don't work(

Help me please, what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [February 20, 2019, 9:09pm UTC](https://discuss.elastic.co/t/create-new-index-pattern-from-console/168991/2 "2019-02-20T21:09:16Z")

</div>

SearchGuard is not an Elastic-supported plugin. If you need support with SearchGuard you may want to post in their [Google Group](https://groups.google.com/forum/#!forum/search-guard).

---

<div class="post-metadata">

**Author:** ![Russ91](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@Russ91](https://discuss.elastic.co/u/Russ91)\
**Post date:** [February 21, 2019, 6:38am UTC](https://discuss.elastic.co/t/create-new-index-pattern-from-console/168991/3 "2019-02-21T06:38:14Z")

</div>

Ok, Thank you!

---

<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 21, 2019, 6:38am UTC](https://discuss.elastic.co/t/create-new-index-pattern-from-console/168991/4 "2019-03-21T06:38:18Z")

</div>

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