Add an index block

PUT /{index}/_block/{block}

Limits the operations allowed on an index by blocking specific operation types.

Path parameters

  • index string Required

    A comma separated list of indices to add a block to

  • block string Required

    The block to add (one of read, write, read_only or metadata)

    Values are metadata, read, read_only, or write.

Query parameters

  • Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

  • expand_wildcards string | array[string]

    Whether to expand wildcard expression to concrete indices that are open, closed or both.

  • Whether specified concrete indices should be ignored when unavailable (missing or closed)

  • Specify timeout for connection to master

  • timeout string

    Explicit operation timeout

Responses

PUT /{index}/_block/{block}
curl \
 -X PUT http://api.example.com/{index}/_block/{block}