How can I create a new index pattern with a curl request?
How can I retrieve the ID of an index pattern with a curl request?
I have tried creating an index pattern with this request, but Kibana freezes when I try to view the index pattern in the Discover panel:
curl -XPOST "http://localhost:9200/.kibana/doc/index-pattern-id" -H 'Content-Type: application/json' -d'
{
"type" : "index-pattern",
"index-pattern" : {
"title": "the-index-pattern*",
"timeFieldName": "@timestamp"
}
}'
The new index pattern appears on the right in the discover page, but when I attempt to view it, Kibana sort of freezes. (I do have indices that match the pattern)
When I do this search:
GET .kibana/_search
The index I created appears. However, it looks different from the other index patterns in that it is missing a "fields" field.