# Applying settings /app/logs/settings via an API

**URL:** <https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771>\
**Category:** Logs\
**Created:** [November 9, 2021, 2:42pm UTC](https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771 "2021-11-09T14:42:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelom888](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@angelom888](https://discuss.elastic.co/u/angelom888)\
**Post date:** [November 9, 2021, 2:42pm UTC](https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771/1 "2021-11-09T14:42:43Z")

</div>

I am able to manually configure the setting for logs streams from

https:/kibanahost:5601/app/logs/settings

I want to do this programmatically but cannot seem to find the API to do this.  
Can anyone help point me in the right direction?

---

<div class="post-metadata">

**Author:** ![riferrei](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/riferrei/32/104867_2.png) [@riferrei](https://discuss.elastic.co/u/riferrei)\
**Post date:** [November 9, 2021, 4:01pm UTC](https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771/2 "2021-11-09T16:01:33Z")

</div>

Hi @angelom888,

Welcome to the Elastic community 🥳

Usually, Kibana shows the equivalent HTTP request that the UI is handling — when the user is supposed to perform that request directly. Sometimes this is impossible because the internal index that holds the information is hidden and not supposed to be touched. I'm afraid this is the case for the logging settings.

You could hack your way out by enabling the browser's debugging console and discovering which requests are executing — but that might be an unsupported operation.

— @riferrei

---

<div class="post-metadata">

**Author:** ![angelom888](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@angelom888](https://discuss.elastic.co/u/angelom888)\
**Post date:** [November 9, 2021, 4:37pm UTC](https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771/3 "2021-11-09T16:37:22Z")

</div>

Looks like I may have found the solution myself.

> [@Configure Kibana Log UI settings per space using API](https://discuss.elastic.co/t/configure-kibana-log-ui-settings-per-space-using-api/251704):
>
> 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

I tried to get the data myself

[https://angelo-otm.eng.stormagic.com:5601/s/default/api/saved\_objects/infrastructure-ui-source/default](https://angelo-otm.eng.stormagic.com:5601/s/default/api/saved_objects/infrastructure-ui-source/default)

and it returned

{"id":"default","type":"infrastructure-ui-source","namespaces":["default"],"updated\_at":"2021-11-04T10:53:48.520Z","version":"WzU2MjksNF0=","attributes":{"name":"Default","description":"","metricAlias":"metrics-_,metricbeat-_","logIndices":{"type":"index\_pattern","indexPatternId":"log\_index\_pattern\_0"},"fields":{"container":"container.id","host":"host.name","message":["message","@message"],"pod":"kubernetes.pod.uid","tiebreaker":"\_doc","timestamp":"@timestamp"},"inventoryDefaultView":"0","metricsExplorerDefaultView":"0","logColumns":[{"timestampColumn":{"id":"5e7f964a-be8a-40d8-88d2-fbcfbdca0e2f"}},{"fieldColumn":{"id":"c72eaf17-12ec-47de-b240-b11da83be718","field":"host.hostname"}},{"fieldColumn":{"id":"96219ad4-a012-42fc-9a67-d4d08f2f3d8b","field":"fields.hosttype"}},{"fieldColumn":{"id":"32c221d0-02b3-4b1d-9aa3-4cc01cb51bd6","field":"fields.logtype"}},{"fieldColumn":{"id":"c4d9e647-58a3-4470-8c23-a89a2a78a4a6","field":"syslog\_severity"}},{"fieldColumn":{"id":"2d7bc33c-ba0b-4d7c-a5c7-bbfc470e90e5","field":"syslog\_program"}},{"messageColumn":{"id":"b645d6da-824b-4723-9a2a-e8cece1645c0"}}],"anomalyThreshold":50},"references":[{"id":"561afbc0-2a97-11ec-a753-39d939b89a0c","type":"index-pattern","name":"log\_index\_pattern\_0"}],"migrationVersion":{"infrastructure-ui-source":"7.13.0"},"coreMigrationVersion":"7.13.4"}

I haven't tried posting it yet,  
but maybe I have the solution.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [November 9, 2021, 4:52pm UTC](https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771/4 "2021-11-09T16:52:25Z")

</div>

Hi @angelom888,

you're on the right track there. The configuration for the Logs and Metrics UIs are just saved objects of type "infrastructure-ui-source", which you can import and export using the [official API](https://www.elastic.co/guide/en/kibana/current/saved-objects-api.html) or the UI.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/4/a4ea47c39db1dced3924396ffd4fb2ff97e4a93c.png)

It's the safest way because it takes care of the migrations and index pattern references too.

---

<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:** [December 7, 2021, 4:53pm UTC](https://discuss.elastic.co/t/applying-settings-app-logs-settings-via-an-api/288771/5 "2021-12-07T16:53:18Z")

</div>

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