mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
## Summary Refactor bulk delete monitor and params routes !! We need to remove usage for body from DELETE route. ### Params Params can be bulk delete now with POST request to `/params/_bulk_delete` endpoint ### Monitors Monitors can be bulk delete now with POST request to `/monitors/_bulk_delete` endpoint
71 lines
2.1 KiB
Text
71 lines
2.1 KiB
Text
[[delete-parameters-api]]
|
|
== Delete Parameters API
|
|
++++
|
|
<titleabbrev>Delete Parameters</titleabbrev>
|
|
++++
|
|
|
|
Deletes one or more parameters from the Synthetics app.
|
|
|
|
=== {api-request-title}
|
|
|
|
`DELETE <kibana host>:<port>/api/synthetics/params/<param_id>`
|
|
|
|
`DELETE <kibana host>:<port>/s/<space_id>/api/synthetics/params/<param_id>`
|
|
|
|
=== {api-prereq-title}
|
|
|
|
You must have `all` privileges for the *Synthetics* feature in the *{observability}* section of the
|
|
<<kibana-feature-privileges,{kib} feature privileges>>.
|
|
|
|
You must have `all` privileges for the *Synthetics* feature in the *{observability}* section of the
|
|
<<kibana-feature-privileges,{kib} feature privileges>>.
|
|
|
|
[[parameters-delete-path-param]]
|
|
==== Path Parameters
|
|
|
|
The request body should contain an array of parameter IDs that you want to delete.
|
|
|
|
`param_id`::
|
|
(Required, string) An id of parameter to delete.
|
|
|
|
Here is an example of a DELETE request to delete a parameter by its ID:
|
|
|
|
[source,sh]
|
|
--------------------------------------------------
|
|
DELETE /api/synthetics/params/param_id1
|
|
--------------------------------------------------
|
|
|
|
[[parameters-delete-response-example]]
|
|
==== Response Example
|
|
|
|
The API response includes information about the deleted parameters, where each entry in the response array contains the following attributes:
|
|
|
|
- `id` (string): The unique identifier of the deleted parameter.
|
|
- `deleted` (boolean): Indicates whether the parameter was successfully deleted (`true` if deleted, `false` if not).
|
|
|
|
Here's an example response for deleting multiple parameters:
|
|
|
|
[source,sh]
|
|
--------------------------------------------------
|
|
[
|
|
{
|
|
"id": "param1-id",
|
|
"deleted": true
|
|
}
|
|
]
|
|
--------------------------------------------------
|
|
|
|
==== Bulk delete parameters
|
|
To delete multiple parameters, you can send a POST request to `/api/synthetics/params/_bulk_delete` with an array of parameter IDs to delete via body.
|
|
|
|
Here is an example of a POST request to delete multiple parameters:
|
|
|
|
[source,sh]
|
|
--------------------------------------------------
|
|
POST /api/synthetics/params/_bulk_delete
|
|
{
|
|
"ids": ["param1-id", "param2-id"]
|
|
}
|
|
--------------------------------------------------
|
|
|
|
|