文档首页> 交换数据空间 EDS> API参考> API> 审计日志> 查询数据资产的审计日志列表
更新时间:2024-04-30 GMT+08:00
分享

查询数据资产的审计日志列表

功能介绍

查询数据资产的审计日志列表。

URI

GET /v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/audit-logs

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID。

获取方法请参考获取项目ID

instance_id

String

实例ID,开通的数据交换平台实例ID。

获取方法请参考获取实例ID

connector_id

String

连接器ID,指定数据交换平台下连接器的ID。

获取方法请参考获取连接器ID

表2 Query参数

参数

是否必选

参数类型

描述

connector_keywords

String

连接器名称过滤关键字。

user_keywords

String

用户名称过滤关键字。

action

String

执行动作过滤:

  • VIEW:查看
  • MODIFY:加工
  • DOWNLOAD:下载

枚举值:

  • VIEW
  • MODIFY
  • DOWNLOAD

start_time

String

发生时间。

end_time

String

结束时间。

offset

Integer

分页查询页码,表示从此页码开始查询,offset大于等于0。

  • 最小值:0
  • 最大值:999999
  • 缺省值:0

limit

Integer

每页显示条目数量,最大数量999,超过999后只返回999(防止单页返回过大)。

  • 最小值:1
  • 最大值:999
  • 缺省值:10

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

data

Array of AuditLog objects

返回数据。

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

表5 AuditLog

参数

参数类型

描述

audit_log_id

String

日志ID。

resource_id

String

资源ID。

resource_name

String

资源名称。

customer_user_id

String

消费连接器用户ID。

customer_user_name

String

消费连接器用户名称。

customer_connector_id

String

消费连接器ID。

customer_connector_name

String

消费连接器名称。

happend_time

String

发生时间。

action

String

限制使用的操作:

  • VIEW:查看
  • MODIFY:加工
  • DOWNLOAD:下载

枚举值:

  • VIEW
  • MODIFY
  • DOWNLOAD

description

Map<String,String>

扩展属性。

状态码: 400

表6 响应Body参数

参数

参数类型

描述

data

-

返回null

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

状态码: 500

表7 响应Body参数

参数

参数类型

描述

data

-

返回null

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

请求示例

查询数据资产的审计日志列表。

GET https://{endpoint}/v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/audit-logs?action=VIEW&offset=0&limit=10

响应示例

状态码: 200

OK

  • 审计日志列表。
    {
      "data" : [ {
        "audit_log_id" : "2a178fd057834c13a457************",
        "resource_id" : "bdcfd032-fe52-448b-a673-************",
        "resource_name" : "三清山.jpg",
        "customer_user_id" : null,
        "customer_user_name" : null,
        "customer_connector_id" : "c1bf9bd7-52fc-435b-ae55-************",
        "customer_connector_name" : "连接器B",
        "happend_time" : "2023-12-01T16:10:28Z",
        "action" : "VIEW",
        "description" : null
      }, {
        "audit_log_id" : "74ae9d9af228437e89ad************",
        "resource_id" : "7c9cafa2-0eb0-4dae-bd8d-************",
        "resource_name" : "三清山.jpg",
        "customer_user_id" : null,
        "customer_user_name" : null,
        "customer_connector_id" : "c1bf9bd7-52fc-435b-ae55-************",
        "customer_connector_name" : "连接器B",
        "happend_time" : "2023-12-01T15:09:36Z",
        "action" : "VIEW",
        "description" : null
      } ]
    }

状态码

状态码

描述

200

OK

400

Bad Request

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品