kibana/docs/api/saved-objects/delete.asciidoc
Kaarina Tungseth fda3196611
[DOCS] Updates API requests and examples (#60695)
* [DOCS] Updates API requests and examples

* Review comments
2020-03-20 16:33:20 -05:00

44 lines
1.2 KiB
Text

[[saved-objects-api-delete]]
=== Delete object API
++++
<titleabbrev>Delete object</titleabbrev>
++++
experimental[] Remove {kib} saved objects.
WARNING: Once you delete a saved object, _it cannot be recovered_.
[[saved-objects-api-delete-request]]
==== Request
`DELETE <kibana host>:<port>/api/saved_objects/<type>/<id>`
`DELETE <kibana host>:<port>/s/<space_id>/api/saved_objects/<type>/<id>`
[[saved-objects-api-delete-path-params]]
==== Path parameters
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
`type`::
(Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`, and `timelion-sheet`.
`id`::
(Required, string) The object ID that you want to remove.
[[saved-objects-api-delete-response-codes]]
==== Response code
`200`::
Indicates a successful call.
==== Example
Delete an index pattern object with the `my-pattern` ID:
[source,sh]
--------------------------------------------------
$ curl -X DELETE "localhost:5601/api/saved_objects/index-pattern/my-pattern"
--------------------------------------------------
// KIBANA