1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- [[dangling-index-import]]
- === Import dangling index API
- ++++
- <titleabbrev>Import dangling index</titleabbrev>
- ++++
- Imports a dangling index.
- [[dangling-index-import-api-request]]
- ==== {api-request-title}
- [source,console]
- --------------------------------------------------
- POST /_dangling/<index-uuid>?accept_data_loss=true
- --------------------------------------------------
- // TEST[skip:Difficult to set up]
- [[dangling-index-import-api-prereqs]]
- ==== {api-prereq-title}
- * If the {es} {security-features} are enabled, you must have the `manage`
- <<privileges-list-cluster,cluster privilege>> to use this API.
- [[dangling-index-import-api-desc]]
- ==== {api-description-title}
- include::{es-repo-dir}/indices/dangling-indices-list.asciidoc[tag=dangling-index-description]
- Import a single index into the cluster by referencing its UUID. Use the
- <<dangling-indices-list,List dangling indices API>> to locate the UUID of an index.
- [[dangling-index-import-api-path-params]]
- ==== {api-path-parms-title}
- `<index-uuid>`::
- (Required, string)
- UUID of the index to import, which you can find using the
- <<dangling-indices-list,List dangling indices API>>.
- [[dangling-index-import-api-query-params]]
- ==== {api-query-parms-title}
- `accept_data_loss`::
- (Required, Boolean)
- This field must be set to `true` to import a dangling index. Because {es}
- cannot know where the dangling index data came from or determine which shard
- copies are fresh and which are stale, it cannot guarantee that the imported data
- represents the latest state of the index when it was last in the cluster.
- include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
- [[dangling-index-import-api-example]]
- ==== {api-examples-title}
- The following example shows how to import a dangling index:
- [source,console]
- --------------------------------------------------
- POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true
- --------------------------------------------------
- // TEST[skip:Difficult to set up]
- The API returns following response:
- [source,console-result]
- --------------------------------------------------
- {
- "acknowledged" : true
- }
- --------------------------------------------------
|