Delete Monitors API
editDelete Monitors API
editDeletes one or more monitors from the Synthetics app.
Request
editDELETE <kibana host>:<port>/api/synthetics/monitors/<config_id>
DELETE <kibana host>:<port>/s/<space_id>/api/synthetics/monitors/<config_id>
Prerequisites
editYou 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
editYou can delete multiple monitors by sending a list of config ids to a POST request to the /api/synthetics/monitors/_bulk_delete
endpoint.
Request Body
editThe 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 POST request to delete a list of monitors by ID:
POST /api/synthetics/monitors/_bulk_delete { "ids": [ "monitor1-id", "monitor2-id" ] }
Response Example
editThe 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 } ]