# API for Managing Synthetic monitoring

**URL:** https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819
**Category:** Kibana
**Created:** [January 11, 2024, 5:57am UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819 "2024-01-11T05:57:35Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Raj\_Jikadra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_jikadra/32/126729_2.png) [@Raj\_Jikadra](https://discuss.elastic.co/u/Raj_Jikadra)
#### Post date: [January 11, 2024, 5:57am UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/1 "2024-01-11T05:57:35Z")

</div>

To manage Monitors created via Synthetic monitoring, we can use `@elastic/synthetics` package, as per the code of `@elastic/synthetics` , it internally uses API to communicate with Kibana regarding monitor changes.

I want to create a separate App to manage monitors based on Java for which I need API to manage the monitors instead of through `@elastic/synthetics` package, but I cant find any documentation for the its APIs.

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [January 19, 2024, 10:52pm UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/2 "2024-01-19T22:52:26Z")

</div>

It doesn't look like there is a public API for running the synthetic tests.

The package you mentioned provides a command-line tool to do this. Is there something you need that the command line tool isn't able to offer?

---

<div class="post-metadata">

### Author: ![Raj\_Jikadra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_jikadra/32/126729_2.png) [@Raj\_Jikadra](https://discuss.elastic.co/u/Raj_Jikadra)
#### Post date: [January 21, 2024, 8:51am UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/3 "2024-01-21T08:51:56Z")

</div>

@tsullivan thanks for the reply.

The only issue is that I have to maintain YAML file for all lightweight monitors. If I want to update a monitor, than I have to update the YAML file and push the changes.

I have to frequently update the monitors via automations, which might be during deployments or any other changes, for which it would be much better/easy to trigger it via API for a single monitor.

---

<div class="post-metadata">

### Author: ![PaulB-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulb-elastic/32/78691_2.png) [@PaulB-Elastic](https://discuss.elastic.co/u/PaulB-Elastic)
#### Post date: [January 22, 2024, 5:14pm UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/4 "2024-01-22T17:14:18Z")

</div>

@Raj_Jikadra, as @tsullivan noted, there is not currently a public API for managing monitors (the solution for that right now would be using Project Monitors and the `@elastic/synthetics` package as you have mentioned).

Some APIs have been created, which you can see referenced in [[Synthetics] Public REST API's · Issue #169547 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/169547).

The PR [https://github.com/elastic/kibana/pull/169928](https://github.com/elastic/kibana/pull/169928) is for adding APIs for managing monitors. I'd suggest following that issue/PR for updates, although don't have any timescales to share on when this might be available.

---

<div class="post-metadata">

### Author: ![Raj\_Jikadra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_jikadra/32/126729_2.png) [@Raj\_Jikadra](https://discuss.elastic.co/u/Raj_Jikadra)
#### Post date: [January 23, 2024, 2:43am UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/5 "2024-01-23T02:43:19Z")

</div>

> [@PaulB-Elastic](#):
>
> The PR [https://github.com/elastic/kibana/pull/169928](https://github.com/elastic/kibana/pull/169928) is for adding APIs for managing monitors. I'd suggest following that issue/PR for updates, although don't have any timescales to share on when this might be available.

@PaulB-Elastic thanks for the reply, Will follow the PR. But just one question, i.e. don't we already have APIs for them, which is used by `@elastic/synthetics` package internally to create/update the monitors?

---

<div class="post-metadata">

### Author: ![PaulB-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulb-elastic/32/78691_2.png) [@PaulB-Elastic](https://discuss.elastic.co/u/PaulB-Elastic)
#### Post date: [January 23, 2024, 12:56pm UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/6 "2024-01-23T12:56:51Z")

</div>

@Raj_Jikadra you are right that the package does communicate with Kibana, but this is through internal _Elastic_ (non public) APIs. Public APIs will be documented and also more carefully considered with regards to making breaking changes, so it requires design/implementation to make this happen.

---

<div class="post-metadata">

### Author: ![Raj\_Jikadra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_jikadra/32/126729_2.png) [@Raj\_Jikadra](https://discuss.elastic.co/u/Raj_Jikadra)
#### Post date: [January 24, 2024, 2:58am UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/7 "2024-01-24T02:58:10Z")

</div>

> [@PaulB-Elastic](#):
>
> @Raj_Jikadra you are right that the package does communicate with Kibana, but this is through internal _Elastic_ (non public) APIs. Public APIs will be documented and also more carefully considered with regards to making breaking changes, so it requires design/implementation to make this happen.

@PaulB-Elastic once again, thanks for the reply. Will track the github issue for it.

---

<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 21, 2024, 2:59am UTC](https://discuss.elastic.co/t/api-for-managing-synthetic-monitoring/350819/8 "2024-02-21T02:59:01Z")

</div>

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