It throws an error -
{"error":"MapperParsingException[failed to parse [visState]]; nested: ElasticsearchIllegalArgumentException[unknown property [type]]; ","status":400}
i think it is because the way the json is written . Part of the json looks like -
"visState": {
"type": "line",
"params": {
"shareYAxis": true,
"addTooltip": true,
"addLegend": true,
"defaultYExtents": false
},
"aggs": [
{
"id": "1",
"type": "min",
"schema": "metric",
"params": {
"field": "value"
}
},
{
"id": "2",
"type": "date_histogram",
"schema": "segment",
"params": {
"field": "timestamp",
"interval": "hour",
"min_doc_count": 1,
"extended_bounds": {
}
}
}
which shows visState contains element like -
"String" = >"String"
"String" = > JSON object
"string" = > [JSON objects]
but i am not sure.
I also tried to convert json document as -
"String" = >"String"
"String" = > "JSON object"
"string" = > "[JSON objects]"
but i got this error -
{"error":"MapperParsingException[object mapping for [visualization] tried to parse field [kibanaSavedObjectMeta] as object, but got EOF, has a concrete value been provided to it?]","status":400}
The entire JSON I am sending -
{
"title": "v11",
"visState": "{\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"defaultYExtents\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"min\",\"schema\":\"metric\",\"params\":{\"field\":\"value\"}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"timestamp\",\"interval\":\"hour\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"type\":\"filters\",\"schema\":\"group\",\"params\":{\"filters\":[{\"input\":{\"query\":{\"query_string\":{\"query\":\"*dpd1\",\"analyze_wildcard\":true}}}},{\"input\":{\"query\":{\"query_string\":{\"query\":\"*cpva\",\"analyze_wildcard\":true}}}}]}}],\"listeners\":{}}",
"description": "",
"savedSearchId": "v11",
"version": 1,
"kibanaSavedObjectMeta": "{\"searchSourceJSON\":{\"index\":\"logstash-abc-*\",\"filter\":[]}}"
}