I am trying to create a search saved object with the following command:
curl -X POST -H 'kbn-xsrf: true' -H 'Content-Type: application/json' 'http://localhost:5601/api/saved_objects/search/cnv' -d @stam.json
I am hitting an error:
{"message":"failed to parse field [search.kibanaSavedObjectMeta.searchSourceJSON] of type [text]: [mapper_parsing_exception] failed to parse field [search.kibanaSavedObjectMeta.searchSourceJSON] of type [text]","statusCode":400,"error":"Bad Request"}
stam.json file:
"attributes":{
"title":"cnv",
"description":"",
"hits":0,
"columns":[
"name"
],
"sort":[
"_score",
"desc"
],
"version":1,
"kibanaSavedObjectMeta":{
"searchSourceJSON":{
"index":"cnv",
"highlightAll":true,
"version":true,
"query":{
"language":"lucene",
"query":""
},
"filter":[]
}
}
}
}