文档首页/ 云审计服务 CTS/ API参考/ 应用示例/ 示例3:查询管理类事件
更新时间:2024-05-21 GMT+08:00
分享

示例3:查询管理类事件

场景描述

本章以查询租户最近一小时内所有管理类事件为例。

涉及其它云服务接口

无。

查询管理类事件列表

  • 接口相关信息

    URI格式:GET /v3/{project_id}/traces

  • 请求示例

    GET https://{cts_endpoint}/v3/{project_id} /traces?trace_type=system

    {cts_endpoint}信息请从地区和终端节点获取。

  • 响应示例
    {
      "meta_data" : {
        "count" : 2,
        "marker" : "e001ccb8-bc09-11e6-b2cc-2640a43cc6e8"
      },
      "traces" : [ {
        "time" : 1472148708232,
        "user" : {
          "name" : "xxx",
          "domain" : {
            "name" : "xxx",
            "id" : "ded649d814464428ba89d04d7955c93e"
          }
        },
        "response" : {
          "code" : "VPC.0514",
          "message" : "Update port fail."
        },
        "code" : 200,
        "service_type" : "VPC",
        "resource_type" : "eip",
        "resource_name" : "192.144.163.1",
        "resource_id" : "d502809d-0d1d-41ce-9690-784282142ccc",
        "trace_name" : "deleteEip",
        "trace_rating" : "warning",
        "trace_type" : "ConsoleAction",
        "api_version" : "2.0",
        "record_time" : 1481066128032,
        "trace_id" : "e001ccb9-bc09-11e6-b00b-4b2a61338db6"
      }, {
        "time" : 1472148708232,
        "user" : {
          "name" : "xxx",
          "domain" : {
            "name" : "xxx",
            "id" : "ded649d814464428ba89d04d7955c93e"
          }
        },
        "response" : {
          "code" : "VPC.0514",
          "message" : "Update port fail."
        },
        "code" : 200,
        "service_type" : "VPC",
        "resource_type" : "eip",
        "resource_name" : "192.144.163.1",
        "resource_id" : "d502809d-0d1d-41ce-9690-784282142ccc",
        "trace_name" : "deleteEip",
        "trace_rating" : "warning",
        "trace_type" : "ConsoleAction",
        "api_version" : "2.0",
        "record_time" : 1481066128032,
        "trace_id" : "e001ccb8-bc09-11e6-b2cc-2640a43cc6e8"
      } ]
    }

相关文档