# Configure Kibana Log UI settings per space using API

**URL:** <https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704>\
**Category:** Logs\
**Created:** [October 12, 2020, 3:35am UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704 "2020-10-12T03:35:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon.seng](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@leon.seng](https://discuss.elastic.co/u/leon.seng)\
**Post date:** [October 12, 2020, 3:35am UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704/1 "2020-10-12T03:35:36Z")

</div>

Hi,

I am currently running Kibanamultiple spaces - each monitoring for different index patterns, in order the trigger alerts and actions on different indices.

This [page](https://www.elastic.co/guide/en/kibana/6.8/logs-ui-settings-kb.html) on Logs UI settings shows how we can configure the default configuration for Kibana Logs.

Is it possible to configure it on a per space basis? I was hoping to automate this process instead of configuring it through the web UI.

Thanks

---

<div class="post-metadata">

**Author:** ![afgomez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/afgomez/32/59274_2.png) [@afgomez](https://discuss.elastic.co/u/afgomez)\
**Post date:** [October 13, 2020, 1:47pm UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704/2 "2020-10-13T13:47:42Z")

</div>

Hi @leon.seng, welcome to elastic!

The kibana log UI settings are stored in a [saved object](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html). There is an [experimental API](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-create.html) you can use to create the right configuration for each space.

```
POST <kibana host>:<port>/s/<space_id>/api/saved_objects/<type>/<id>

```

For the logs UI settings, the `<type>` of the saved object is `"infrastructure-ui-source"` and the `<id>` is `"default"`.

In your request add a `logAlias` attribute with the value that you want.

```
$ curl -X POST http://your-kibana.example.com/s/<space_id>/api/saved_objects/infrastructure-ui-source/default -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
  "attributes": {
    "logAlias": "es-index-*"
  }
}'

```

Take into account that this API is experimental and might change in future releases.

Let me know if it worked for you!

---

<div class="post-metadata">

**Author:** ![leon.seng](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@leon.seng](https://discuss.elastic.co/u/leon.seng)\
**Post date:** [October 14, 2020, 12:00am UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704/3 "2020-10-14T00:00:21Z")

</div>

Thanks! That worked for me. Is there documentation on getting all Alerts within a space too? This is what worked for me to retrieve ONE Alert by ID

```auto
GET <kibana host>:<port>/s/<space_id>/api/saved_objects/alert/<id>

```

But how do I figure out what the Alert ID is beforehand.

---

<div class="post-metadata">

**Author:** ![afgomez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/afgomez/32/59274_2.png) [@afgomez](https://discuss.elastic.co/u/afgomez)\
**Post date:** [October 15, 2020, 9:15am UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704/4 "2020-10-15T09:15:00Z")

</div>

> Is there documentation on getting all Alerts within a space too?

I checked with the alerts team. There is a non-public API documented [here](https://github.com/elastic/kibana/tree/master/x-pack/plugins/alerts), but the API is not stable (that's why is not public yet) and its interface can change at any time, so take that into account 🙂

---

<div class="post-metadata">

**Author:** ![leon.seng](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@leon.seng](https://discuss.elastic.co/u/leon.seng)\
**Post date:** [October 15, 2020, 10:11pm UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704/5 "2020-10-15T22:11:13Z")

</div>

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:** [November 12, 2020, 10:11pm UTC](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704/6 "2020-11-12T22:11:18Z")

</div>

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