My GET request is returning an error response to my query. Can't figure out what's wrong with my DSL.
Error:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "Unknown key for a START_ARRAY in [query].",
"line": 11,
"col": 14
}
],
"type": "parsing_exception",
"reason": "Unknown key for a START_ARRAY in [query].",
"line": 11,
"col": 14
},
"status": 400
}
Query:
{
"size": 1,
"sort": [
{
"@timestamp": {
"unmapped_type": "boolean",
"order": "desc"
}
}
],
"query": [
{
"query_string": {
"query": "\"context.request.body.event.type\": 7",
"analyze_wildcard": true
},
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"gte": "now-20m"
}
}
}
]
}
}
]
}