云日志服务 LTS-查询结构化日志:响应示例

时间:2023-11-01 16:16:14

响应示例

状态码为 200 时:

  • 当“sql_expression”参数填写为select *
      "struct_logs": [        {            "test4": "151687",            "test2": "08:59:53",            "test3": "this",            "line_num": "1595811593539371695",            "log_content": "2020-07-27/08:59:53 this log is Error NO 151687\n",            "test1": "2020-07-27"        },        {            "test4": "151686",            "test2": "08:59:52",            "test3": "this",            "line_num": "1595811592539361171",            "log_content": "2020-07-27/08:59:52 this log is Error NO 151686\n",            "test1": "2020-07-27"        },        {            "test4": "151685",            "test2": "08:59:51",            "test3": "this",            "line_num": "1595811591539422860",            "log_content": "2020-07-27/08:59:51 this log is Error NO 151685\n",            "test1": "2020-07-27"        },        {            "test4": "151684",            "test2": "08:59:50",            "test3": "this",            "line_num": "1595811590539454127",            "log_content": "2020-07-27/08:59:50 this log is Error NO 151684\n",            "test1": "2020-07-27"        }]}
  • 当“sql_expression”参数填写为select count(test3), sum(test4)
    {    "struct_logs": [        {            "cnt(test3)": "4",            "sum(test4)": "606742.000"        }    ]}
  • 当“sql_expression”参数填写为select count(test3), sum(test4) group by(test1)
    {    "struct_logs": [        {            "cnt(test3)": "4",            "sum(test4)": "606742.000",            "test1": "2020-07-27"        }    ]}
support.huaweicloud.com/api-lts/lts_api_0025.html