LookupInsightEvents - 查询洞察事件

更新时间:
复制为 MD 格式

查询Insight事件。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

NextToken

string

分页游标。用于请求下一页检索的结果。

  • 首次请求时置空。

  • 后续请求时传入上一次响应返回的NextToken值。

VjE6dLbnNpVmbz06****

MaxResults

string

允许返回的最大结果数目。

  • 取值范围:1~50(包含)。

  • 默认值:20。

20

StartTime

string

检索事件的开始时间,默认为当前时间 7 天前的时间点。

日期格式按照 ISO8601 标准,并使用 UTC 时间。格式为:yyyy-MM-ddTHH:mm:ssZ

说明
  • 若时间跨度小于 93 天,查询范围内的时间。跨度超过 93 天时,只查询 93 天的内容。

2026-01-07T04:10:00Z

EndTime

string

检索事件的结束时间,默认为当前时间点。

日期格式按照 ISO8601 标准,并使用 UTC 时间。格式为:yyyy-MM-ddTHH:mm:ssZ

2026-01-07T07:10:00Z

LookupAttribute

array<object>

检索条件数组。

说明
  • 一次只能指定一个或两个检索条件,参考限制说明

object

检索条件。

Key

string

检索条件的 Key。取值请参见: 调用 LookupInsightEvents 接口检索 Insights 事件时如何设置 LookupAttribute 参数

InsightType

Value

string

检索条件的 Value。取值请参见: 调用 LookupInsightEvents 接口检索 Insights 事件时如何设置 LookupAttribute 参数

IpInsight

返回参数

名称

类型

描述

示例值

object

Events

array<object>

Insight 事件对象列表。

object

Insight 事件对象。

{ "eventId": "408ACD94-4531-4D66-BA14-1F7248AC****", "eventCategory": "Insight", "sharedEventId": "55CF0739-97D8-4221-A6BE-8E60E746****", "eventVersion": "1", "eventTime": "2026-01-07T05:40:00Z", "insightDetails": { "insightContext": { "attributions": [ { "insight": [ { "average": 3, "value": "AlibabaCloud API Workbench" } ], "attribute": "userAgent" }, { "insight": [ { "average": 3, "value": "20376656170607****" } ], "attribute": "principalId" }, { "insight": [ { "average": 3, "value": "Actiontrail/EnableInsight" } ], "attribute": "apiRelated" }, { "insight": [ { "average": 3, "value": "null" } ], "attribute": "errorCode" } ], "statistics": { "insight": { "average": 3, "predict": 0 }, "insightDuration": 1, "baseline": { "threshold": 0.6 }, "insightCount": 3 } }, "state": "Start", "insightType": "IpInsight", "insightObject": "xxx.xxx.xxx.xxx" }, "acsRegion": "cn-qingdao", "eventType": "ActionTrailInsight" }

NextToken

string

当符合查询条件的数据未读取完时,服务端会返回NextToken,此时可以使用NextToken继续读取后面的数据。第一次查询不需要提供这个参数。

VjE6bHJlTGoxdm1M****

RequestId

string

请求 ID。

851038F3-33AB-4C49-97D7-6AB37D35****

示例

正常返回示例

JSON格式

{
  "Events": [
    {
      "eventId": "408ACD94-4531-4D66-BA14-1F7248AC****",
      "eventCategory": "Insight",
      "sharedEventId": "55CF0739-97D8-4221-A6BE-8E60E746****",
      "eventVersion": "1",
      "eventTime": "2026-01-07T05:40:00Z",
      "insightDetails": {
        "insightContext": {
          "attributions": [
            {
              "insight": [
                {
                  "average": 3,
                  "value": "AlibabaCloud API Workbench"
                }
              ],
              "attribute": "userAgent"
            },
            {
              "insight": [
                {
                  "average": 3,
                  "value": "20376656170607****"
                }
              ],
              "attribute": "principalId"
            },
            {
              "insight": [
                {
                  "average": 3,
                  "value": "Actiontrail/EnableInsight"
                }
              ],
              "attribute": "apiRelated"
            },
            {
              "insight": [
                {
                  "average": 3,
                  "value": "null"
                }
              ],
              "attribute": "errorCode"
            }
          ],
          "statistics": {
            "insight": {
              "average": 3,
              "predict": 0
            },
            "insightDuration": 1,
            "baseline": {
              "threshold": 0.6
            },
            "insightCount": 3
          }
        },
        "state": "Start",
        "insightType": "IpInsight",
        "insightObject": "xxx.xxx.xxx.xxx"
      },
      "acsRegion": "cn-qingdao",
      "eventType": "ActionTrailInsight"
    }
  ],
  "NextToken": "VjE6bHJlTGoxdm1M****",
  "RequestId": "851038F3-33AB-4C49-97D7-6AB37D35****"
}

错误码

HTTP status code

错误码

错误信息

描述

400 IncompleteSignature The request signature does not conform to Alibaba Cloud standards. 签名不匹配。请检查AcceseKey IDAccessKey Secret是否正确;检查签名方法是否正确。详细信息参见“签名机制”。
400 InvalidParameterCombination The end time must be later than the start time. 结束时间必须晚于开始时间。
400 InvalidQueryParameter The specified query parameter is invalid. 无效的查询参数。
400 InvalidParameterDateOutOfRange Query time range exceeds 30 days. 查询时间范围超出30天。
400 InvalidParameterEndTime The specified EndTime is invalid. 无效的参数EndTime。
400 InvalidParameterStartTime The specified StartTime is invalid. 无效的参数StartTime。
400 InvalidParameterStartTimeExceedsCurrent The StartTime exceeds the current time. Use GMT time format for queries. 开始时间超过当前时间,请使用标准GMT时间查询。
400 InvalidParameterStartTimeOutOfDate The StartTime exceeds the limit of 90 days. 开始时间超出90天限制。
400 InvalidTimeRangeException The end time must be later than the start time. The time span cannot exceed 30 days. 结束时间应晚于开始时间,且时间跨度不能超过30天。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情