Delete saved objects Deprecated

POST /api/saved_objects/_bulk_delete

WARNING: When you delete a saved object, it cannot be recovered.

Headers

  • kbn-xsrf string Required

    Cross-site request forgery protection

Query parameters

  • force boolean

    When true, force delete objects that exist in multiple namespaces. Note that the option applies to the whole request. Use the delete object API to specify per-object deletion behavior. TIP: Use this if you attempted to delete objects and received an HTTP 400 error with the following message: "Unable to delete saved object that exists in multiple namespaces, use the force option to delete it anyway". WARNING: When you bulk delete objects that exist in multiple namespaces, the API also deletes legacy url aliases that reference the object. These requests are batched to minimise the impact but they can place a heavy load on Kibana. Make sure you limit the number of objects that exist in multiple namespaces in a single bulk delete operation.

application/json; Elastic-Api-Version=2023-10-31

Body Required

object object

Responses

  • 200 application/json; Elastic-Api-Version=2023-10-31

    Indicates a successful call. NOTE: This HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual objects will be returned in the response body.

  • 400 application/json; Elastic-Api-Version=2023-10-31

    Bad request

    Hide response attributes Show response attributes object
POST /api/saved_objects/_bulk_delete
curl \
 -X POST https://localhost:5601/api/saved_objects/_bulk_delete \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
 -H "kbn-xsrf: string"
Request examples
# Headers
kbn-xsrf: string

# Payload
[
  {}
]
Response examples (200)
{}
Response examples (400)
{
  "error": "Bad Request",
  "message": "string",
  "statusCode": 400
}