query 数组逐条执行,单条查询出错不会立刻中断,会把错误累积到 errMsg;errMsg 非空或所有命中为空,整体接口仍然报错。cate 做一次资源级权限校验(详见 CheckDsPerm)。curl --location 'https://api.flashcat.cloud/api/n9e-plus/logs-query' \
--header 'Content-Type: application/json' \
--data-raw '{
"cate": "elasticsearch",
"datasource_id": 7,
"query": [
{
"ref": "A",
"index_type": "index",
"index": "logs-*",
"date_field": "@timestamp",
"filter": "level:ERROR AND service:order",
"start": 1748246400,
"end": 1748250000,
"limit": 50,
"page": 0,
"ascending": false
}
]
}'{
"err": "",
"dat": {
"total": 1234,
"list": [
{
"_index": "logs-2026.05.26",
"_id": "abc",
"_source": {
"level": "ERROR",
"msg": "something went wrong"
}
}
]
}
}