# Is there any Kibana API endpoint to get index pattern for the current login user or if there is an existing implementation for it?

**URL:** <https://discuss.elastic.co/t/is-there-any-kibana-api-endpoint-to-get-index-pattern-for-the-current-login-user-or-if-there-is-an-existing-implementation-for-it/276941>\
**Category:** Kibana\
**Created:** [June 24, 2021, 2:12pm UTC](https://discuss.elastic.co/t/is-there-any-kibana-api-endpoint-to-get-index-pattern-for-the-current-login-user-or-if-there-is-an-existing-implementation-for-it/276941 "2021-06-24T14:12:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HemaS](https://avatars.discourse-cdn.com/v4/letter/h/46a35a/32.png) [@HemaS](https://discuss.elastic.co/u/HemaS)\
**Post date:** [June 24, 2021, 2:12pm UTC](https://discuss.elastic.co/t/is-there-any-kibana-api-endpoint-to-get-index-pattern-for-the-current-login-user-or-if-there-is-an-existing-implementation-for-it/276941/1 "2021-06-24T14:12:40Z")

</div>

I'm developing custom Kibana plugin and I want to get the current logged in user information from my plugin server. It would be great if any Kibana API endpoint is available to get such details.

---

<div class="post-metadata">

**Author:** ![HemaS](https://avatars.discourse-cdn.com/v4/letter/h/46a35a/32.png) [@HemaS](https://discuss.elastic.co/u/HemaS)\
**Post date:** [June 28, 2021, 10:12am UTC](https://discuss.elastic.co/t/is-there-any-kibana-api-endpoint-to-get-index-pattern-for-the-current-login-user-or-if-there-is-an-existing-implementation-for-it/276941/2 "2021-06-28T10:12:35Z")

</div>

Any updates?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 28, 2021, 11:57am UTC](https://discuss.elastic.co/t/is-there-any-kibana-api-endpoint-to-get-index-pattern-for-the-current-login-user-or-if-there-is-an-existing-implementation-for-it/276941/3 "2021-06-28T11:57:04Z")

</div>

The default index pattern is not configured per user, but per space. You can get it from the data plugin index patterns service:

```auto
const defaultIndexPattern = await data.indexPatterns.getDefault();

```

---

<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:** [July 26, 2021, 11:57am UTC](https://discuss.elastic.co/t/is-there-any-kibana-api-endpoint-to-get-index-pattern-for-the-current-login-user-or-if-there-is-an-existing-implementation-for-it/276941/4 "2021-07-26T11:57:25Z")

</div>

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