API for Managing Synthetic monitoring

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.

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?

@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.

@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.

The PR 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?

@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.

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