Delete Monitors API

edit

Deletes one or more monitors from the Synthetics app.

Request

edit

DELETE <kibana host>:<port>/api/synthetics/monitors/<config_id>

DELETE <kibana host>:<port>/s/<space_id>/api/synthetics/monitors/<config_id>

Prerequisites

edit

You must have all privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.

You must have all privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.

Path parameters

edit
config_id
(Required, string) The ID of the monitor that you want to delete.

Here is an example of a DELETE request to delete a monitor by ID:

DELETE /api/synthetics/monitors/monitor1-id

Bulk Delete Monitors

edit

You can delete multiple monitors by sending a list of config ids to a DELETE request to the /api/synthetics/monitors endpoint.

Request Body

edit

The request body should contain an array of monitors IDs that you want to delete.

ids
(Required, array of strings) An array of monitor IDs to delete.

Here is an example of a DELETE request to delete a list of monitors by ID:

DELETE /api/synthetics/monitors
{
  "ids": [
    "monitor1-id",
    "monitor2-id"
  ]
}

Response Example

edit

The API response includes information about the deleted monitors, where each entry in the response array contains the following attributes:

  • id (string): The unique identifier of the deleted monitor.
  • deleted (boolean): Indicates whether the monitor was successfully deleted (true if deleted, false if not).

Here’s an example response for deleting multiple monitors:

[
  {
    "id": "monitor1-id",
    "deleted": true
  },
  {
    "id": "monitor2-id",
    "deleted": true
  }
]