Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ElasticSearchStuff

list indices

http://localhost:9200/_cat/indices?v

create index

PUT indexName
{
    "mappings" : {
        "_doc" : {
            "properties" : {
                "field1" : { "type" : "text" }
            }
        }
    }
}

list index mapping

indexName/_mapping?pretty

delete index

DELETE /indexName

curl -X DELETE "localhost:9200/indexName?pretty"

search

/indexName/_search?pretty

[FORBIDDEN/12/index read-only / allow delete (api)]

.kibana/_settings?pretty
# blocks.read_only_allow_delete => false
OR
_cluster/settings?pretty
OR
indexName/_settings?pretty
PUT /[index_name]/_settings
{
  "index.blocks.read_only_allow_delete": null
}

OR 

PUT /*/_settings
{
  "index.blocks.read_only_allow_delete": null
}

curl -X PUT "localhost:9200/*/_settings" -H 'Content-Type: application/json' -d'{"index.blocks.read_only_allow_delete": null}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.