[[indices-exists]] === Exists API ++++ Exists ++++ Checks if a data stream, index, or alias exists. [source,console] ---- HEAD my-data-stream ---- // TEST[setup:my_data_stream] // TEST[teardown:data_stream_cleanup] [[indices-exists-api-request]] ==== {api-request-title} `HEAD ` [[indices-exists-api-prereqs]] ==== {api-prereq-title} * If the {es} {security-features} are enabled, you must have the `view_index_metadata` or `manage` <> for the target. [[indices-exists-api-path-params]] ==== {api-path-parms-title} ``:: (Optional, string) Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). [[indices-exists-api-query-params]] ==== {api-query-parms-title} include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices] + Defaults to `true`. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards] + Defaults to `open`. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=flat-settings] include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=include-defaults] include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable] include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=local] [[indices-exists-api-response-codes]] ==== {api-response-codes-title} `200`:: All targets exist. `404`:: One or more specified targets do not exist.