查询数据资产的审计日志列表 - ShowAuditLog
功能介绍
查询数据资产的审计日志列表。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/audit-logs
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID。 获取方法请参考获取项目ID。 |
instance_id | 是 | String | 实例ID,开通的交换数据平台实例ID。 获取方法请参考获取实例ID。 |
connector_id | 是 | String | 连接器ID,指定交换数据平台下连接器的ID。 获取方法请参考获取连接器ID。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
connector_keywords | 否 | String | 连接器名称过滤关键字。 |
user_keywords | 否 | String | 用户名称过滤关键字。 |
action | 否 | String | 执行动作过滤: 枚举值: |
start_time | 否 | String | 发生时间。 |
end_time | 否 | String | 结束时间。 |
offset | 否 | Integer | 偏移量,表示从此偏移量开始查询,offset大于等于0。 |
limit | 否 | Integer | 每页显示条目数量,最大数量999,超过999后只返回999(防止单页返回过大)。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token,通过调用IAM服务“获取用户Token”接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
data | Array of AuditLog objects | 返回数据。 |
total | Long | 总数。 |
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
参数 | 参数类型 | 描述 |
|---|---|---|
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 | 限制使用的操作: 枚举值: |
description | Map<String,String> | 扩展属性。 |
状态码: 400
参数 | 参数类型 | 描述 |
|---|---|---|
data | Object | 返回数据。 |
total | Long | 总数。 |
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
状态码: 500
参数 | 参数类型 | 描述 |
|---|---|---|
data | Object | 返回数据。 |
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 |
错误码
请参见错误码。

