Hello
I am trying to use the new search api
‘/api/views/search/’
‘/api/views/search/sync’
but all my attemps are resulting in an error
{
“type”: “ApiError”,
“message”: “Cannot construct instance oforg.graylog.plugins.views.search.Query$Builder
, problem: Missing required properties: id\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 28, column: 13] (through reference chain: org.graylog.plugins.views.search.AutoValue_Search$Builder["queries"])”
}
I am using the following json data
{
"queries":
[
{
"filter":
{
"filters":
[
{
"id": "5fc8f016433116429ffae32e",
"type": "stream"
}
],
"type": "or"
},
"query":
{
"query_string": "log_level: \"[ERROR]\"",
"type": "elasticsearch"
},
"search_types": [],
"timerange":
{
"type": "relative",
"range": 1209600
}
}
],
"parameters": []
}
It seems that I need to call a different api endpoint and retrieve an ID first?
Or do I just use the /legacy/search/relative endpoint? which seems less than ideal considering it is a legacy endpoint