# Kibana REST API for integrations setup

**URL:** <https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151>\
**Category:** Kibana\
**Created:** [December 29, 2022, 11:46am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151 "2022-12-29T11:46:03Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![OlLap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ollap/32/115365_2.png) [@OlLap](https://discuss.elastic.co/u/OlLap)\
**Post date:** [December 29, 2022, 11:46am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/1 "2022-12-29T11:46:03Z")

</div>

Hello,

I have installed Elastic stack using ECK (Elasticsearch, Kibana, Beats, APM Server + agents), and trying to automate setup moving manual configuration steps to Kubernetes jobs that use Elasticsearch REST API.

But can't find any API to install and configure Elastic APM integration on Kibana. Is there a way to automate this setup process?

Thank you!

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [December 29, 2022, 6:32pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/2 "2022-12-29T18:32:42Z")

</div>

Hello @OlLap , which version of ECK are you working with?

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [December 29, 2022, 6:36pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/3 "2022-12-29T18:36:57Z")

</div>

Also, just to double check, you are not using Fleet correct?

---

<div class="post-metadata">

**Author:** ![OlLap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ollap/32/115365_2.png) [@OlLap](https://discuss.elastic.co/u/OlLap)\
**Post date:** [December 29, 2022, 7:42pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/4 "2022-12-29T19:42:36Z")

</div>

ECK 2.5.0  
And yes, no Fleet

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 3, 2023, 10:23am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/5 "2023-01-03T10:23:01Z")

</div>

> [@OlLap](#):
>
> I have installed Elastic stack using ECK (Elasticsearch, Kibana, Beats, APM Server + agents), and trying to automate setup moving manual configuration steps to Kubernetes jobs that use Elasticsearch REST API.
> 
> But can't find any API to install and configure Elastic APM integration on Kibana. Is there a way to automate this setup process?
> 
> Thank you!

Ok, so at first glance it doesn't look like it's intrinsically possible to do what you are asking...  
"APM Server exposes an API endpoint that allows agents to query the server for configuration changes", from: [Agent configuration API | APM User Guide [8.5] | Elastic](https://www.elastic.co/guide/en/apm/guide/8.5/api-config.html)

I'll ask my colleagues as well.

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 3, 2023, 10:24am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/6 "2023-01-03T10:24:38Z")

</div>

Which agent are you using?

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 3, 2023, 10:37am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/7 "2023-01-03T10:37:41Z")

</div>

Hello again @OlLap and happy new year!  
I've reached out to colleagues on the APM team concerning your question.

The moment I hear something back I will let you know.

Ok, I've just heard back.

On k8s, you can automatically install the bundled APM integration in your K8s definition:  
[K8s Definition](https://github.com/elastic/apm-server/blob/e3278b7bde86a542989318c0cd4fe099b8e0399a/testing/infra/k8s/base/stack/kibana.yaml#L65-L83)

Does this help?

---

<div class="post-metadata">

**Author:** ![OlLap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ollap/32/115365_2.png) [@OlLap](https://discuss.elastic.co/u/OlLap)\
**Post date:** [January 3, 2023, 4:01pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/8 "2023-01-03T16:01:26Z")

</div>

Hello,

thank you for providing this information. I tried with this config lines, but agent policy wasn't created automatically, only Elastic APM integration was created using lines 40-42 from your link.

Maybe it's because I don't have Fleet installed.. But don't see a reason why I need it in my ELK setup

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 4, 2023, 1:52pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/9 "2023-01-04T13:52:53Z")

</div>

ah ok, I'm glad something helped! Let me ask my teammate about the agent policy auto-creation.

So, I just asked and he's in a different time zone.  
I'll let you know as soon as I get a response!

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 5, 2023, 10:35am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/10 "2023-01-05T10:35:08Z")

</div>

Hello again @OlLap ☀  
I'm sorry but the APM server has a hard dependency on Fleet now.  
I am out of ideas if we are not going to use Fleet ☹

---

<div class="post-metadata">

**Author:** ![OlLap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ollap/32/115365_2.png) [@OlLap](https://discuss.elastic.co/u/OlLap)\
**Post date:** [January 5, 2023, 11:17am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/11 "2023-01-05T11:17:38Z")

</div>

Hello,

but can you explain in simple terms why I actually need this Fleet if everything works without it?

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 9, 2023, 11:10am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/12 "2023-01-09T11:10:32Z")

</div>

I'll ask right now!

While we wait, my colleague also mentioned this link:

> **[apm-server/testing/infra/k8s/base/stack at...](https://github.com/elastic/apm-server/tree/e3278b7bde86a542989318c0cd4fe099b8e0399a/testing/infra/k8s/base/stack)**
>
> e3278b7bde86a542989318c0cd4fe099b8e0399a/testing/infra/k8s/base/stack

At least with this directory, we can see that the apm server depends on fleet. Soon we will find out why. 🤞

---

<div class="post-metadata">

**Author:** ![marclop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marclop/32/119339_2.png) [@marclop](https://discuss.elastic.co/u/marclop)\
**Post date:** [January 10, 2023, 12:59am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/13 "2023-01-10T00:59:33Z")

</div>

@OlLap APM currently requires Fleet for powering several APM-specific features:

- APM Agent central configuration is pushed to APM Server via Fleet
- Source maps are stored as Fleet artifacts, with references to them pushed down to APM Server via Fleet; APM Server then fetches the source maps via Fleet Server.
- Tail-based sampling policies are defined in the integration policy, and pushed down to APM Server via Fleet.

Because of this requirement on Fleet, we currently do not support Elastic Agent standalone mode. This is mentioned as a [note in our docs](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html#set-up-fleet-traces):

> The APM integration does not support running Elastic Agent in standalone mode; you must use Fleet to manage Elastic Agent.

We're working towards not requiring fleet-server in future versions of APM Server. Keep an eye on the changelog since we're expecting this change to happen in the near future.

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 10, 2023, 10:08am UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/14 "2023-01-10T10:08:23Z")

</div>

thanks @marclop !

---

<div class="post-metadata">

**Author:** ![bhuvahh](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@bhuvahh](https://discuss.elastic.co/u/bhuvahh)\
**Post date:** [January 10, 2023, 1:29pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/15 "2023-01-10T13:29:10Z")

</div>

I am out of ideas if we are not going to use Fleet ☹[.](https://panoramacharter.ltd/)

[.](https://19216811.bid/)

---

<div class="post-metadata">

**Author:** ![Tre\_Seymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tre_seymour/32/46507_2.png) [@Tre\_Seymour](https://discuss.elastic.co/u/Tre_Seymour)\
**Post date:** [January 10, 2023, 3:21pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/16 "2023-01-10T15:21:34Z")

</div>

@OlLap just curious about why do you not want to use Fleet?

---

<div class="post-metadata">

**Author:** ![OlLap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ollap/32/115365_2.png) [@OlLap](https://discuss.elastic.co/u/OlLap)\
**Post date:** [January 16, 2023, 12:49pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/17 "2023-01-16T12:49:24Z")

</div>

Because it works without Fleet 😀 just wonder why I need to add one more resource if for my needs it works without it

Thank you everyone for explanation, I'll try to include Fleet

---

<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:** [February 13, 2023, 12:50pm UTC](https://discuss.elastic.co/t/kibana-rest-api-for-integrations-setup/322151/18 "2023-02-13T12:50:20Z")

</div>

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